From 61ad2e2666aaf71c172e6340af8a64761a9d8d7b Mon Sep 17 00:00:00 2001
From: Muhamad Visat Sutarno <mvisat@gmail.com>
Date: Thu, 7 Apr 2016 11:56:52 +0700
Subject: [PATCH] rename tables

---
 .../app/Http/Controllers/VendorUserController.php    |  4 ++--
 IES-Bandung/app/Model/GovUser.php                    | 10 +++++-----
 IES-Bandung/app/Model/ObjectSell.php                 |  4 ++--
 IES-Bandung/app/Model/ObjectSellRateAndReview.php    |  2 +-
 IES-Bandung/app/Model/ObjectType.php                 |  2 +-
 IES-Bandung/app/Model/PublicUser.php                 |  2 +-
 IES-Bandung/app/Model/VendorRateAndReview.php        |  3 +--
 IES-Bandung/app/Model/VendorUser.php                 |  2 +-
 .../migrations/2016_04_04_022610_gov_user.php        |  8 ++------
 .../migrations/2016_04_04_022611_vendor_user.php     |  8 ++------
 .../migrations/2016_04_04_022612_public_user.php     |  8 ++------
 .../migrations/2016_04_04_022613_object_type.php     |  8 ++------
 .../migrations/2016_04_04_022615_object_sell.php     | 12 ++++--------
 ...2016_04_04_023939_object_sell_rate_and_review.php | 12 ++++--------
 .../2016_04_04_024730_vendor_rate_and_review.php     | 12 ++++--------
 .../migrations/2016_04_05_144116_gov_user_log.php    |  4 ++--
 .../migrations/2016_04_05_144129_vendor_user_log.php |  4 ++--
 .../migrations/2016_04_05_144150_public_user_log.php |  4 ++--
 .../migrations/2016_04_05_145431_object_type_log.php |  4 ++--
 .../migrations/2016_04_05_150010_object_sell_log.php |  4 ++--
 ..._04_05_150338_object_sell_rate_and_review_log.php |  4 ++--
 .../2016_04_05_150657_vendor_rate_and_review_log.php |  4 ++--
 .../migrations/2016_04_06_020321_user_log.php        |  4 ++--
 ...16_04_06_051454_user_log_after_insert_trigger.php |  4 ++--
 ...6_060217_public_user_log_after_insert_trigger.php |  4 ++--
 ...4_06_061227_gov_user_log_after_insert_trigger.php |  4 ++--
 ...6_061637_vendor_user_log_after_insert_trigger.php |  6 +++---
 ...6_061851_vendor_user_log_after_update_trigger.php |  4 ++--
 ...6_062313_object_type_log_after_insert_trigger.php |  4 ++--
 ...6_062533_object_sell_log_after_insert_trigger.php |  4 ++--
 ...6_063143_object_sell_log_after_update_trigger.php |  4 ++--
 ...sell_rate_and_review_log_after_insert_trigger.php |  8 ++++----
 ...sell_rate_and_review_log_after_update_trigger.php |  8 ++++----
 ...ndor_rate_and_review_log_after_insert_trigger.php |  8 ++++----
 ...ndor_rate_and_review_log_after_update_trigger.php |  8 ++++----
 35 files changed, 83 insertions(+), 112 deletions(-)

diff --git a/IES-Bandung/app/Http/Controllers/VendorUserController.php b/IES-Bandung/app/Http/Controllers/VendorUserController.php
index 245bd0f..fced306 100644
--- a/IES-Bandung/app/Http/Controllers/VendorUserController.php
+++ b/IES-Bandung/app/Http/Controllers/VendorUserController.php
@@ -17,9 +17,9 @@ class VendorUserController extends Controller
         $userId = Auth::user()['id'];
         $user = VendorUser::getFullProfile($userId);
         $objects = ObjectSell::
-            join('ObjectType', 'ObjectSell.object_type_id', '=', 'ObjectType.id')->
+            join('object_types', 'object_sells.object_type_id', '=', 'object_types.id')->
             where('vendor_user_id', '=', $user->vendor_user_id)->
-            select('ObjectSell.*', 'ObjectType.name')
+            select('object_sells.*', 'object_types.name')
             ->get();
 
         return view('vendorUser', [
diff --git a/IES-Bandung/app/Model/GovUser.php b/IES-Bandung/app/Model/GovUser.php
index 8e9682e..ee852fe 100644
--- a/IES-Bandung/app/Model/GovUser.php
+++ b/IES-Bandung/app/Model/GovUser.php
@@ -8,16 +8,16 @@ use App\User;
 class GovUser extends Model
 {
     //
-    protected $table = 'GovUser';
+    protected $table = 'gov_users';
 
-    public function createNewGovUser($userID, $nip) {
+    public function createNewGovUser($userId, $nip) {
     	return $this->$insert(array(
-    			'id' => $userID,
+    			'id' => $userId,
     			'nip' => $nip
     		));
     }
 
-    public function getFullProfile($userID) {
-    	return $this->join('users', 'users.id', '=', 'GovUser.id')->where('GovUser.id', '=', $userID)->get();
+    public function getFullProfile($userId) {
+    	return $this->join('users', 'users.id', '=', 'gov_users.id')->where('gov_users.user_id', '=', $userId)->get();
     }
 }
diff --git a/IES-Bandung/app/Model/ObjectSell.php b/IES-Bandung/app/Model/ObjectSell.php
index 280ef2d..37f364e 100644
--- a/IES-Bandung/app/Model/ObjectSell.php
+++ b/IES-Bandung/app/Model/ObjectSell.php
@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
 class ObjectSell extends Model
 {
     //
-    protected $table = 'ObjectSell';
+    protected $table = 'object_sells';
 
     public function createNewObjectSell($vendorUserID, $name, $objectTypeID) {
     	return $this->insert(array(
@@ -18,6 +18,6 @@ class ObjectSell extends Model
     }
 
     public function getAllObjectSell($vendorUserID) {
-    	return $this->join('ObjectType', 'ObjectSell.object_type_id', '=', 'ObjectType.id')->where('vendor_user_id', '=', $vendorUserID)->get();
+    	return $this->join('object_types', 'ObjectSell.object_type_id', '=', 'ObjectType.id')->where('vendor_user_id', '=', $vendorUserID)->get();
     }
 }
diff --git a/IES-Bandung/app/Model/ObjectSellRateAndReview.php b/IES-Bandung/app/Model/ObjectSellRateAndReview.php
index 2011d5a..ad5c119 100644
--- a/IES-Bandung/app/Model/ObjectSellRateAndReview.php
+++ b/IES-Bandung/app/Model/ObjectSellRateAndReview.php
@@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model;
 class ObjectSellRateAndReview extends Model
 {
     //
-    $table = 'ObjectSellRateAndReview';
+    $table = 'object_sell_rate_reviews';
 
     public function createOSRR($objectSellID, $publicUserID, $rating_val, $review_msg) {
     	return $this->insert(array(
diff --git a/IES-Bandung/app/Model/ObjectType.php b/IES-Bandung/app/Model/ObjectType.php
index a291c1a..8208816 100644
--- a/IES-Bandung/app/Model/ObjectType.php
+++ b/IES-Bandung/app/Model/ObjectType.php
@@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Model;
 
 class ObjectType extends Model
 {
-    protected $table = 'ObjectType';
+    protected $table = 'object_types';
 
     public function createNewObjectType($newname) {
     	return $this->insert(array(
diff --git a/IES-Bandung/app/Model/PublicUser.php b/IES-Bandung/app/Model/PublicUser.php
index a017a1a..0f242f7 100644
--- a/IES-Bandung/app/Model/PublicUser.php
+++ b/IES-Bandung/app/Model/PublicUser.php
@@ -8,7 +8,7 @@ use App\User;
 class PublicUser extends Model
 {
     //
-    protected $table = 'PublicUser';
+    protected $table = 'public_users';
 
     public function createNewPublicUser($userID) {
     	$this->userID = $userID;
diff --git a/IES-Bandung/app/Model/VendorRateAndReview.php b/IES-Bandung/app/Model/VendorRateAndReview.php
index 609f12d..1b4c90f 100644
--- a/IES-Bandung/app/Model/VendorRateAndReview.php
+++ b/IES-Bandung/app/Model/VendorRateAndReview.php
@@ -6,8 +6,7 @@ use Illuminate\Database\Eloquent\Model;
 
 class VendorRateAndReview extends Model
 {
-    //
-    $table = 'VendorRateAndReview';
+    protected $table = 'vendor_rate_reviews';
 
     public function createNewVRR($publicUserID, $vendorUserID, $rating_val, $review_msg) {
     	return $this->insert(array(
diff --git a/IES-Bandung/app/Model/VendorUser.php b/IES-Bandung/app/Model/VendorUser.php
index 4e49c40..776aa44 100644
--- a/IES-Bandung/app/Model/VendorUser.php
+++ b/IES-Bandung/app/Model/VendorUser.php
@@ -7,7 +7,7 @@ use App\User;
 
 class VendorUser extends Model
 {
-    protected $table = 'VendorUser';
+    protected $table = 'vendor_users';
 
     public static function getFullProfile($userId) {
     	return VendorUser::join('users', 'users.id', '=', 'VendorUser.user_id')->where('VendorUser.user_id', '=', $userId)->first();
diff --git a/IES-Bandung/database/migrations/2016_04_04_022610_gov_user.php b/IES-Bandung/database/migrations/2016_04_04_022610_gov_user.php
index 5906ad1..7f60d17 100644
--- a/IES-Bandung/database/migrations/2016_04_04_022610_gov_user.php
+++ b/IES-Bandung/database/migrations/2016_04_04_022610_gov_user.php
@@ -12,8 +12,7 @@ class GovUser extends Migration
      */
     public function up()
     {
-        Schema::create('GovUser', function (Blueprint $table) {
-            //
+        Schema::create('gov_users', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('user_id')->unsigned();
             $table->bigInteger('nip')->unsigned()->unique();
@@ -30,9 +29,6 @@ class GovUser extends Migration
      */
     public function down()
     {
-        Schema::table('GovUser', function (Blueprint $table) {
-            //
-            $table->drop('GovUser');
-        });
+        Schema::drop('gov_users');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_04_022611_vendor_user.php b/IES-Bandung/database/migrations/2016_04_04_022611_vendor_user.php
index 7f7d5fd..f620486 100644
--- a/IES-Bandung/database/migrations/2016_04_04_022611_vendor_user.php
+++ b/IES-Bandung/database/migrations/2016_04_04_022611_vendor_user.php
@@ -12,8 +12,7 @@ class VendorUser extends Migration
      */
     public function up()
     {
-        Schema::create('VendorUser', function (Blueprint $table) {
-            //
+        Schema::create('vendor_users', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('user_id')->unsigned();
             $table->mediumText('place');
@@ -30,9 +29,6 @@ class VendorUser extends Migration
      */
     public function down()
     {
-        Schema::table('VendorUser', function (Blueprint $table) {
-            //
-            $table->drop('VendorUser');
-        });
+        Schema::drop('vendor_users');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_04_022612_public_user.php b/IES-Bandung/database/migrations/2016_04_04_022612_public_user.php
index 9ee333f..cf47f04 100644
--- a/IES-Bandung/database/migrations/2016_04_04_022612_public_user.php
+++ b/IES-Bandung/database/migrations/2016_04_04_022612_public_user.php
@@ -12,8 +12,7 @@ class PublicUser extends Migration
      */
     public function up()
     {
-        Schema::create('PublicUser', function (Blueprint $table) {
-            //
+        Schema::create('public_users', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('user_id')->unsigned();
             $table->string('ip_addr');
@@ -29,9 +28,6 @@ class PublicUser extends Migration
      */
     public function down()
     {
-        Schema::table('PublicUser', function (Blueprint $table) {
-            //
-            $table->drop('PublicUser');
-        });
+        Schema::drop('public_users');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_04_022613_object_type.php b/IES-Bandung/database/migrations/2016_04_04_022613_object_type.php
index 2085502..e4f037a 100644
--- a/IES-Bandung/database/migrations/2016_04_04_022613_object_type.php
+++ b/IES-Bandung/database/migrations/2016_04_04_022613_object_type.php
@@ -12,8 +12,7 @@ class ObjectType extends Migration
      */
     public function up()
     {
-        Schema::create('ObjectType', function (Blueprint $table) {
-            //
+        Schema::create('object_types', function (Blueprint $table) {
             $table->increments('id');
             $table->longText('name');
             $table->string('ip_addr');
@@ -28,9 +27,6 @@ class ObjectType extends Migration
      */
     public function down()
     {
-        Schema::table('ObjectType', function (Blueprint $table) {
-            //
-            $table->drop('ObjectType');
-        });
+        Schema::drop('object_types');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_04_022615_object_sell.php b/IES-Bandung/database/migrations/2016_04_04_022615_object_sell.php
index 06fa11b..df08559 100644
--- a/IES-Bandung/database/migrations/2016_04_04_022615_object_sell.php
+++ b/IES-Bandung/database/migrations/2016_04_04_022615_object_sell.php
@@ -12,16 +12,15 @@ class ObjectSell extends Migration
      */
     public function up()
     {
-        Schema::create('ObjectSell', function (Blueprint $table) {
-            //
+        Schema::create('object_sells', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('vendor_user_id')->unsigned();
             $table->string('name');
             $table->integer('object_type_id')->unsigned();
             $table->integer('price')->unsigned();
             $table->string('ip_addr');
-            $table->foreign('vendor_user_id')->references('id')->on('VendorUser');
-            $table->foreign('object_type_id')->references('id')->on('ObjectType');
+            $table->foreign('vendor_user_id')->references('id')->on('vendor_users');
+            $table->foreign('object_type_id')->references('id')->on('object_types');
             $table->timestamps();
         });
     }
@@ -33,9 +32,6 @@ class ObjectSell extends Migration
      */
     public function down()
     {
-        Schema::table('ObjectSell', function (Blueprint $table) {
-            //
-            Schema::drop('ObjectSell');
-        });
+        Schema::drop('object_sells');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_04_023939_object_sell_rate_and_review.php b/IES-Bandung/database/migrations/2016_04_04_023939_object_sell_rate_and_review.php
index 2d6bbfe..ba63874 100644
--- a/IES-Bandung/database/migrations/2016_04_04_023939_object_sell_rate_and_review.php
+++ b/IES-Bandung/database/migrations/2016_04_04_023939_object_sell_rate_and_review.php
@@ -12,16 +12,15 @@ class ObjectSellRateAndReview extends Migration
      */
     public function up()
     {
-        Schema::create('ObjectSellRateAndReview', function (Blueprint $table) {
-            //
+        Schema::create('object_sell_rate_reviews', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('object_sell_id')->unsigned();
             $table->integer('public_user_id')->unsigned();
             $table->integer('rating_val');
             $table->longText('review_msg')->nullable();
             $table->string('ip_addr');
-            $table->foreign('object_sell_id')->references('id')->on('ObjectSell');
-            $table->foreign('public_user_id')->references('id')->on('PublicUser');
+            $table->foreign('object_sell_id')->references('id')->on('object_sells');
+            $table->foreign('public_user_id')->references('id')->on('public_users');
             $table->timestamps();
         });
     }
@@ -33,9 +32,6 @@ class ObjectSellRateAndReview extends Migration
      */
     public function down()
     {
-        Schema::table('ObjectSellRateAndReview', function (Blueprint $table) {
-            //
-            $table->drop('ObjectSellRateAndReview');
-        });
+        Schema::drop('object_sell_rate_reviews');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_04_024730_vendor_rate_and_review.php b/IES-Bandung/database/migrations/2016_04_04_024730_vendor_rate_and_review.php
index 5f867ec..293480e 100644
--- a/IES-Bandung/database/migrations/2016_04_04_024730_vendor_rate_and_review.php
+++ b/IES-Bandung/database/migrations/2016_04_04_024730_vendor_rate_and_review.php
@@ -12,16 +12,15 @@ class VendorRateAndReview extends Migration
      */
     public function up()
     {
-        Schema::create('VendorRateAndReview', function (Blueprint $table) {
-            //
+        Schema::create('vendor_rate_reviews', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('public_user_id')->unsigned();
             $table->integer('vendor_user_id')->unsigned();
             $table->integer('rating_val');
             $table->longText('review_msg')->nullable();
             $table->string('ip_addr');
-            $table->foreign('public_user_id')->references('id')->on('PublicUser');
-            $table->foreign('vendor_user_id')->references('id')->on('VendorUser');
+            $table->foreign('public_user_id')->references('id')->on('public_users');
+            $table->foreign('vendor_user_id')->references('id')->on('vendor_users');
             $table->timestamps();
         });
     }
@@ -33,9 +32,6 @@ class VendorRateAndReview extends Migration
      */
     public function down()
     {
-        Schema::table('VendorRateAndReview', function (Blueprint $table) {
-            //
-            $table->drop('VendorRateAndReview');
-        });
+        Schema::drop('vendor_rate_reviews');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_05_144116_gov_user_log.php b/IES-Bandung/database/migrations/2016_04_05_144116_gov_user_log.php
index 2f7ccca..4efd6fd 100644
--- a/IES-Bandung/database/migrations/2016_04_05_144116_gov_user_log.php
+++ b/IES-Bandung/database/migrations/2016_04_05_144116_gov_user_log.php
@@ -12,7 +12,7 @@ class GovUserLog extends Migration
      */
     public function up()
     {
-        Schema::create('GovUserLog', function (Blueprint $table) {
+        Schema::create('gov_user_logs', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('gov_user_id')->unsigned();
             $table->integer('user_id')->unsigned();
@@ -30,6 +30,6 @@ class GovUserLog extends Migration
      */
     public function down()
     {
-        Schema::drop('GovUserLog');
+        Schema::drop('gov_user_logs');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_05_144129_vendor_user_log.php b/IES-Bandung/database/migrations/2016_04_05_144129_vendor_user_log.php
index 66e97c6..dd511b8 100644
--- a/IES-Bandung/database/migrations/2016_04_05_144129_vendor_user_log.php
+++ b/IES-Bandung/database/migrations/2016_04_05_144129_vendor_user_log.php
@@ -12,7 +12,7 @@ class VendorUserLog extends Migration
      */
     public function up()
     {
-        Schema::create('VendorUserLog', function (Blueprint $table) {
+        Schema::create('vendor_user_logs', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('vendor_user_id')->unsigned();
             $table->integer('user_id')->unsigned();
@@ -31,6 +31,6 @@ class VendorUserLog extends Migration
      */
     public function down()
     {
-        Schema::drop('VendorUserLog');
+        Schema::drop('vendor_user_logs');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_05_144150_public_user_log.php b/IES-Bandung/database/migrations/2016_04_05_144150_public_user_log.php
index dfd306c..1700a3e 100644
--- a/IES-Bandung/database/migrations/2016_04_05_144150_public_user_log.php
+++ b/IES-Bandung/database/migrations/2016_04_05_144150_public_user_log.php
@@ -12,7 +12,7 @@ class PublicUserLog extends Migration
      */
     public function up()
     {
-        Schema::create('PublicUserLog', function (Blueprint $table) {
+        Schema::create('public_user_logs', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('public_user_id')->unsigned();
             $table->integer('user_id')->unsigned();
@@ -29,6 +29,6 @@ class PublicUserLog extends Migration
      */
     public function down()
     {
-        Schema::drop('PublicUserLog');
+        Schema::drop('public_user_logs');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_05_145431_object_type_log.php b/IES-Bandung/database/migrations/2016_04_05_145431_object_type_log.php
index e9d9cd1..5395662 100644
--- a/IES-Bandung/database/migrations/2016_04_05_145431_object_type_log.php
+++ b/IES-Bandung/database/migrations/2016_04_05_145431_object_type_log.php
@@ -12,7 +12,7 @@ class ObjectTypeLog extends Migration
      */
     public function up()
     {
-        Schema::create('ObjectTypeLog', function (Blueprint $table) {
+        Schema::create('object_type_logs', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('object_type_id')->unsigned();
             $table->longText('name');
@@ -29,6 +29,6 @@ class ObjectTypeLog extends Migration
      */
     public function down()
     {
-        Schema::drop('ObjectTypeLog');
+        Schema::drop('object_type_logs');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_05_150010_object_sell_log.php b/IES-Bandung/database/migrations/2016_04_05_150010_object_sell_log.php
index 4a60e38..f7417f4 100644
--- a/IES-Bandung/database/migrations/2016_04_05_150010_object_sell_log.php
+++ b/IES-Bandung/database/migrations/2016_04_05_150010_object_sell_log.php
@@ -12,7 +12,7 @@ class ObjectSellLog extends Migration
      */
     public function up()
     {
-        Schema::create('ObjectSellLog', function (Blueprint $table) {
+        Schema::create('object_sell_logs', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('object_sell_id')->unsigned();
             $table->integer('vendor_user_id')->unsigned();
@@ -33,6 +33,6 @@ class ObjectSellLog extends Migration
      */
     public function down()
     {
-        Schema::drop('ObjectSellLog');
+        Schema::drop('object_sell_logs');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_05_150338_object_sell_rate_and_review_log.php b/IES-Bandung/database/migrations/2016_04_05_150338_object_sell_rate_and_review_log.php
index 82eff23..dcd2c8c 100644
--- a/IES-Bandung/database/migrations/2016_04_05_150338_object_sell_rate_and_review_log.php
+++ b/IES-Bandung/database/migrations/2016_04_05_150338_object_sell_rate_and_review_log.php
@@ -12,7 +12,7 @@ class ObjectSellRateAndReviewLog extends Migration
      */
     public function up()
     {
-        Schema::create('ObjectSellRateAndReviewLog', function (Blueprint $table) {
+        Schema::create('object_sell_rate_review_logs', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('osrr_id')->unsigned();
             $table->integer('object_sell_id')->unsigned();
@@ -34,6 +34,6 @@ class ObjectSellRateAndReviewLog extends Migration
      */
     public function down()
     {
-        Schema::drop('ObjectSellRateAndReviewLog');
+        Schema::drop('object_sell_rate_review_logs');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_05_150657_vendor_rate_and_review_log.php b/IES-Bandung/database/migrations/2016_04_05_150657_vendor_rate_and_review_log.php
index c83b4e1..a01c181 100644
--- a/IES-Bandung/database/migrations/2016_04_05_150657_vendor_rate_and_review_log.php
+++ b/IES-Bandung/database/migrations/2016_04_05_150657_vendor_rate_and_review_log.php
@@ -12,7 +12,7 @@ class VendorRateAndReviewLog extends Migration
      */
     public function up()
     {
-        Schema::create('VendorRateAndReviewLog', function (Blueprint $table) {
+        Schema::create('vendor_rate_review_logs', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('vrr_id')->unsigned();
             $table->integer('publicDBID')->unsigned();
@@ -34,6 +34,6 @@ class VendorRateAndReviewLog extends Migration
      */
     public function down()
     {
-        Schema::drop('VendorRateAndReviewLog');
+        Schema::drop('vendor_rate_review_logs');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_06_020321_user_log.php b/IES-Bandung/database/migrations/2016_04_06_020321_user_log.php
index 0f892df..00213ca 100644
--- a/IES-Bandung/database/migrations/2016_04_06_020321_user_log.php
+++ b/IES-Bandung/database/migrations/2016_04_06_020321_user_log.php
@@ -12,7 +12,7 @@ class UserLog extends Migration
      */
     public function up()
     {
-        Schema::create('UserLog', function (Blueprint $table) {
+        Schema::create('user_logs', function (Blueprint $table) {
             $table->increments('id');
             $table->integer('user_id')->unsigned();
             $table->string('username');
@@ -39,6 +39,6 @@ class UserLog extends Migration
      */
     public function down()
     {
-        Schema::drop('UserLog');
+        Schema::drop('user_logs');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_06_051454_user_log_after_insert_trigger.php b/IES-Bandung/database/migrations/2016_04_06_051454_user_log_after_insert_trigger.php
index cc04018..c82f471 100644
--- a/IES-Bandung/database/migrations/2016_04_06_051454_user_log_after_insert_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_051454_user_log_after_insert_trigger.php
@@ -12,13 +12,13 @@ class UserLogAfterInsertTrigger extends Migration
      */
     public function up()
     {
-        // 
+        //
         DB::unprepared('
                 CREATE TRIGGER `users_log_AFTER_INSERT_TRIGGER`
                     AFTER INSERT ON `users`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `UserLog`
+                        INSERT INTO `user_logs`
                         SET action = \'insert.a\',
                             user_id = NEW.id,
                             username = NEW.username,
diff --git a/IES-Bandung/database/migrations/2016_04_06_060217_public_user_log_after_insert_trigger.php b/IES-Bandung/database/migrations/2016_04_06_060217_public_user_log_after_insert_trigger.php
index 5dc3fd2..bb7fbff 100644
--- a/IES-Bandung/database/migrations/2016_04_06_060217_public_user_log_after_insert_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_060217_public_user_log_after_insert_trigger.php
@@ -15,10 +15,10 @@ class PublicUserLogAfterInsertTrigger extends Migration
         //
         DB::unprepared('
                 CREATE TRIGGER `public_user_log_AFTER_INSERT_TRIGGER`
-                    AFTER INSERT ON `PublicUser`
+                    AFTER INSERT ON `public_users`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `PublicUserLog`
+                        INSERT INTO `public_user_logs`
                         SET action = \'insert.a\',
                             public_user_id = NEW.id,
                             user_id = NEW.user_id,
diff --git a/IES-Bandung/database/migrations/2016_04_06_061227_gov_user_log_after_insert_trigger.php b/IES-Bandung/database/migrations/2016_04_06_061227_gov_user_log_after_insert_trigger.php
index 6f9501a..31cf1ab 100644
--- a/IES-Bandung/database/migrations/2016_04_06_061227_gov_user_log_after_insert_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_061227_gov_user_log_after_insert_trigger.php
@@ -15,10 +15,10 @@ class GovUserLogAfterInsertTrigger extends Migration
         //
         DB::unprepared('
                 CREATE TRIGGER `gov_user_log_AFTER_INSERT_TRIGGER`
-                    AFTER INSERT ON `GovUser`
+                    AFTER INSERT ON `gov_users`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `GovUserLog`
+                        INSERT INTO `gov_user_logs`
                         SET action = \'insert.a\',
                             gov_user_id = NEW.id,
                             user_id = NEW.user_id,
diff --git a/IES-Bandung/database/migrations/2016_04_06_061637_vendor_user_log_after_insert_trigger.php b/IES-Bandung/database/migrations/2016_04_06_061637_vendor_user_log_after_insert_trigger.php
index 0336334..a1c50eb 100644
--- a/IES-Bandung/database/migrations/2016_04_06_061637_vendor_user_log_after_insert_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_061637_vendor_user_log_after_insert_trigger.php
@@ -15,10 +15,10 @@ class VendorUserLogAfterInsertTrigger extends Migration
         //
         DB::unprepared('
                 CREATE TRIGGER `vendor_user_log_AFTER_INSERT_TRIGGER`
-                    AFTER INSERT ON `VendorUser`
+                    AFTER INSERT ON `vendor_users`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `VendorUserLog`
+                        INSERT INTO `vendor_user_logs`
                         SET action = \'insert.a\',
                             vendor_user_id = NEW.id,
                             user_id = NEW.user_id,
@@ -28,7 +28,7 @@ class VendorUserLogAfterInsertTrigger extends Migration
                             updated_at = NEW.updated_at;
                     END
             ');
-                  
+
     }
 
     /**
diff --git a/IES-Bandung/database/migrations/2016_04_06_061851_vendor_user_log_after_update_trigger.php b/IES-Bandung/database/migrations/2016_04_06_061851_vendor_user_log_after_update_trigger.php
index 06e4331..6910083 100644
--- a/IES-Bandung/database/migrations/2016_04_06_061851_vendor_user_log_after_update_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_061851_vendor_user_log_after_update_trigger.php
@@ -15,10 +15,10 @@ class VendorUserLogAfterUpdateTrigger extends Migration
         //
         DB::unprepared('
                 CREATE TRIGGER `vendor_user_log_AFTER_UPDATE_TRIGGER`
-                    AFTER UPDATE ON `VendorUser`
+                    AFTER UPDATE ON `vendor_users`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `VendorUserLog`
+                        INSERT INTO `vendor_user_logs`
                         SET action = \'update.a\',
                             vendor_user_id = NEW.id,
                             user_id = NEW.user_id,
diff --git a/IES-Bandung/database/migrations/2016_04_06_062313_object_type_log_after_insert_trigger.php b/IES-Bandung/database/migrations/2016_04_06_062313_object_type_log_after_insert_trigger.php
index abe0c75..ed931c7 100644
--- a/IES-Bandung/database/migrations/2016_04_06_062313_object_type_log_after_insert_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_062313_object_type_log_after_insert_trigger.php
@@ -15,10 +15,10 @@ class ObjectTypeLogAfterInsertTrigger extends Migration
         //
         DB::unprepared('
                 CREATE TRIGGER `object_type_log_AFTER_INSERT_TRIGGER`
-                    AFTER INSERT ON `ObjectType`
+                    AFTER INSERT ON `object_types`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `ObjectTypeLog`
+                        INSERT INTO `object_type_logs`
                         SET action = \'insert.a\',
                             object_type_id = NEW.id,
                             name = NEW.name,
diff --git a/IES-Bandung/database/migrations/2016_04_06_062533_object_sell_log_after_insert_trigger.php b/IES-Bandung/database/migrations/2016_04_06_062533_object_sell_log_after_insert_trigger.php
index 9565fa6..2714004 100644
--- a/IES-Bandung/database/migrations/2016_04_06_062533_object_sell_log_after_insert_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_062533_object_sell_log_after_insert_trigger.php
@@ -15,10 +15,10 @@ class ObjectSellLogAfterInsertTrigger extends Migration
         //
         DB::unprepared('
                 CREATE TRIGGER `object_sell_log_AFTER_INSERT_TRIGGER`
-                    AFTER INSERT ON `ObjectSell`
+                    AFTER INSERT ON `object_sells`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `ObjectSellLog`
+                        INSERT INTO `object_sell_logs`
                         SET action = \'insert.a\',
                             object_sell_id = NEW.id,
                             vendor_user_id = NEW.vendor_user_id,
diff --git a/IES-Bandung/database/migrations/2016_04_06_063143_object_sell_log_after_update_trigger.php b/IES-Bandung/database/migrations/2016_04_06_063143_object_sell_log_after_update_trigger.php
index 01d6f77..47d1209 100644
--- a/IES-Bandung/database/migrations/2016_04_06_063143_object_sell_log_after_update_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_063143_object_sell_log_after_update_trigger.php
@@ -15,10 +15,10 @@ class ObjectSellLogAfterUpdateTrigger extends Migration
         //
         DB::unprepared('
                 CREATE TRIGGER `object_sell_log_AFTER_UPDATE_TRIGGER`
-                    AFTER UPDATE ON `ObjectSell`
+                    AFTER UPDATE ON `object_sells`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `ObjectSellLog`
+                        INSERT INTO `object_sell_logs`
                         SET action = \'update.a\',
                             object_sell_id = NEW.id,
                             vendor_user_id = NEW.vendor_user_id,
diff --git a/IES-Bandung/database/migrations/2016_04_06_063430_object_sell_rate_and_review_log_after_insert_trigger.php b/IES-Bandung/database/migrations/2016_04_06_063430_object_sell_rate_and_review_log_after_insert_trigger.php
index 98370fd..f42d975 100644
--- a/IES-Bandung/database/migrations/2016_04_06_063430_object_sell_rate_and_review_log_after_insert_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_063430_object_sell_rate_and_review_log_after_insert_trigger.php
@@ -14,11 +14,11 @@ class ObjectSellRateAndReviewLogAfterInsertTrigger extends Migration
     {
         //
         DB::unprepared('
-                CREATE TRIGGER `object_sell_rate_and_review_log_AFTER_INSERT_TRIGGER`
-                    AFTER INSERT ON `ObjectSellRateAndReview`
+                CREATE TRIGGER `object_sell_rate_reviews_log_AFTER_INSERT_TRIGGER`
+                    AFTER INSERT ON `object_sell_rate_reviews`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `ObjectSellRateAndReviewLog`
+                        INSERT INTO `object_sell_rate_review_logs`
                         SET action = \'insert.a\',
                             osrr_id = NEW.id,
                             object_sell_id = NEW.object_sell_id,
@@ -41,6 +41,6 @@ class ObjectSellRateAndReviewLogAfterInsertTrigger extends Migration
     public function down()
     {
         //
-        DB::statement('DROP TRIGGER `object_sell_rate_and_review_log_AFTER_INSERT_TRIGGER`');
+        DB::statement('DROP TRIGGER `object_sell_rate_review_log_AFTER_INSERT_TRIGGER`');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_06_063649_object_sell_rate_and_review_log_after_update_trigger.php b/IES-Bandung/database/migrations/2016_04_06_063649_object_sell_rate_and_review_log_after_update_trigger.php
index d1924df..20c725a 100644
--- a/IES-Bandung/database/migrations/2016_04_06_063649_object_sell_rate_and_review_log_after_update_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_063649_object_sell_rate_and_review_log_after_update_trigger.php
@@ -14,11 +14,11 @@ class ObjectSellRateAndReviewLogAfterUpdateTrigger extends Migration
     {
         //
         DB::unprepared('
-                CREATE TRIGGER `object_sell_rate_and_review_log_AFTER_UPDATE_TRIGGER`
-                    AFTER UPDATE ON `ObjectSellRateAndReview`
+                CREATE TRIGGER `object_sell_rate_review_log_AFTER_UPDATE_TRIGGER`
+                    AFTER UPDATE ON `object_sell_rate_reviews`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `ObjectSellRateAndReviewLog`
+                        INSERT INTO `object_sell_rate_review_logs`
                         SET action = \'update.a\',
                             osrr_id = NEW.id,
                             object_sell_id = NEW.object_sell_id,
@@ -41,6 +41,6 @@ class ObjectSellRateAndReviewLogAfterUpdateTrigger extends Migration
     public function down()
     {
         //
-        DB::statement('DROP TRIGGER `object_sell_rate_and_review_log_AFTER_UPDATE_TRIGGER`');
+        DB::statement('DROP TRIGGER `object_sell_rate_review_log_AFTER_UPDATE_TRIGGER`');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_06_063910_vendor_rate_and_review_log_after_insert_trigger.php b/IES-Bandung/database/migrations/2016_04_06_063910_vendor_rate_and_review_log_after_insert_trigger.php
index af67c16..a3bdeab 100644
--- a/IES-Bandung/database/migrations/2016_04_06_063910_vendor_rate_and_review_log_after_insert_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_063910_vendor_rate_and_review_log_after_insert_trigger.php
@@ -14,11 +14,11 @@ class VendorRateAndReviewLogAfterInsertTrigger extends Migration
     {
         //
         DB::unprepared('
-                CREATE TRIGGER `vendor_rate_and_review_log_AFTER_INSERT_TRIGGER`
-                    AFTER INSERT ON `VendorRateAndReview`
+                CREATE TRIGGER `vendor_rate_review_log_AFTER_INSERT_TRIGGER`
+                    AFTER INSERT ON `vendor_rate_reviews`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `VendorRateAndReviewLog`
+                        INSERT INTO `vendor_rate_review_logs`
                         SET action = \'insert.a\',
                             vrr_id = NEW.id,
                             public_user_id = NEW.public_user_id,
@@ -41,6 +41,6 @@ class VendorRateAndReviewLogAfterInsertTrigger extends Migration
     public function down()
     {
         //
-        DB::statement('DROP TRIGGER `vendor_rate_and_review_log_AFTER_INSERT_TRIGGER`');
+        DB::statement('DROP TRIGGER `vendor_rate_review_log_AFTER_INSERT_TRIGGER`');
     }
 }
diff --git a/IES-Bandung/database/migrations/2016_04_06_064048_vendor_rate_and_review_log_after_update_trigger.php b/IES-Bandung/database/migrations/2016_04_06_064048_vendor_rate_and_review_log_after_update_trigger.php
index 720b54b..b7e8cee 100644
--- a/IES-Bandung/database/migrations/2016_04_06_064048_vendor_rate_and_review_log_after_update_trigger.php
+++ b/IES-Bandung/database/migrations/2016_04_06_064048_vendor_rate_and_review_log_after_update_trigger.php
@@ -14,11 +14,11 @@ class VendorRateAndReviewLogAfterUpdateTrigger extends Migration
     {
         //
         DB::unprepared('
-                CREATE TRIGGER `vendor_rate_and_review_log_AFTER_UPDATE_TRIGGER`
-                    AFTER UPDATE ON `VendorRateAndReview`
+                CREATE TRIGGER `vendor_rate_review_log_AFTER_UPDATE_TRIGGER`
+                    AFTER UPDATE ON `vendor_rate_reviews`
                     FOR EACH ROW
                     BEGIN
-                        INSERT INTO `VendorRateAndReviewLog`
+                        INSERT INTO `vendor_rate_review_logs`
                         SET action = \'insert.a\',
                             vrr_id = NEW.id,
                             public_user_id = NEW.public_user_id,
@@ -41,6 +41,6 @@ class VendorRateAndReviewLogAfterUpdateTrigger extends Migration
     public function down()
     {
         //
-        DB::statement('DROP TRIGGER `vendor_rate_and_review_log_AFTER_UPDATE_TRIGGER`');
+        DB::statement('DROP TRIGGER `vendor_rate_review_log_AFTER_UPDATE_TRIGGER`');
     }
 }
-- 
GitLab