From 2405878dd7aa78b3965d506b23c6a48c77ed6c47 Mon Sep 17 00:00:00 2001 From: Erick Chandra <erickchandra.1@gmail.com> Date: Thu, 7 Apr 2016 10:33:03 +0700 Subject: [PATCH] Update renaming with convention for ID columns for all tables. --- .../Http/Controllers/ObjectSellController.php | 10 +++++----- .../Http/Controllers/VendorUserController.php | 4 ++-- IES-Bandung/app/Model/GovUser.php | 4 ++-- IES-Bandung/app/Model/ObjectSell.php | 10 +++++----- .../app/Model/ObjectSellRateAndReview.php | 16 ++++++++-------- IES-Bandung/app/Model/PublicUser.php | 2 +- IES-Bandung/app/Model/VendorRateAndReview.php | 18 +++++++++--------- IES-Bandung/app/Model/VendorUser.php | 4 ++-- IES-Bandung/app/User.php | 8 ++++---- .../migrations/2016_04_04_022610_gov_user.php | 6 +++--- .../2016_04_04_022611_vendor_user.php | 6 +++--- .../2016_04_04_022612_public_user.php | 6 +++--- .../2016_04_04_022613_object_type.php | 2 +- .../2016_04_04_022615_object_sell.php | 10 +++++----- ...4_04_023939_object_sell_rate_and_review.php | 10 +++++----- ...016_04_04_024730_vendor_rate_and_review.php | 10 +++++----- .../2016_04_05_144116_gov_user_log.php | 4 ++-- .../2016_04_05_144129_vendor_user_log.php | 4 ++-- .../2016_04_05_144150_public_user_log.php | 4 ++-- .../2016_04_05_145431_object_type_log.php | 2 +- .../2016_04_05_150010_object_sell_log.php | 6 +++--- ..._150338_object_sell_rate_and_review_log.php | 6 +++--- ...04_05_150657_vendor_rate_and_review_log.php | 4 ++-- .../migrations/2016_04_06_020321_user_log.php | 2 +- ...06_051454_user_log_after_insert_trigger.php | 2 +- ...06_054018_user_log_after_update_trigger.php | 2 +- ...17_public_user_log_after_insert_trigger.php | 4 ++-- ...61227_gov_user_log_after_insert_trigger.php | 4 ++-- ...37_vendor_user_log_after_insert_trigger.php | 4 ++-- ...51_vendor_user_log_after_update_trigger.php | 4 ++-- ...13_object_type_log_after_insert_trigger.php | 2 +- ...33_object_sell_log_after_insert_trigger.php | 6 +++--- ...43_object_sell_log_after_update_trigger.php | 6 +++--- ...ate_and_review_log_after_insert_trigger.php | 6 +++--- ...ate_and_review_log_after_update_trigger.php | 6 +++--- ...ate_and_review_log_after_insert_trigger.php | 6 +++--- ...ate_and_review_log_after_update_trigger.php | 6 +++--- 37 files changed, 108 insertions(+), 108 deletions(-) diff --git a/IES-Bandung/app/Http/Controllers/ObjectSellController.php b/IES-Bandung/app/Http/Controllers/ObjectSellController.php index 823ea06..f7e7dde 100644 --- a/IES-Bandung/app/Http/Controllers/ObjectSellController.php +++ b/IES-Bandung/app/Http/Controllers/ObjectSellController.php @@ -31,18 +31,18 @@ class ObjectSellController extends Controller $objectType = new ObjectType; $objectType->name = $request->name; $objectType->save(); - $objectType->objectTypeID = $objectType->id; + // $objectType->objectTypeID = $objectType->id; } $userId = Auth::user()['id']; $vendorUserModel = new VendorUser; - $vendorDBID = $vendorUserModel->getFullProfile($userId)['vendorDBID']; - echo $vendorDBID; + $vendorUserID = $vendorUserModel->getFullProfile($userId)['vendor_user_id']; + echo $vendorUserID; $item = new ObjectSell; - $item->vendorDBID = $vendorDBID; + $item->vendorUserID = $vendorUserID; $item->name = $request->name; - $item->objectTypeID = $objectType->objectTypeID; + $item->object_type_id = $objectType->id; $item->price = $request->price; $item->save(); diff --git a/IES-Bandung/app/Http/Controllers/VendorUserController.php b/IES-Bandung/app/Http/Controllers/VendorUserController.php index a7e2bd3..2218cee 100644 --- a/IES-Bandung/app/Http/Controllers/VendorUserController.php +++ b/IES-Bandung/app/Http/Controllers/VendorUserController.php @@ -22,8 +22,8 @@ class VendorUserController extends Controller $userId = Auth::user()['id']; $user = $this->VendorUserModel->getFullProfile($userId); $objects = ObjectSell:: - join('ObjectType', 'ObjectSell.objectTypeID', '=', 'ObjectType.objectTypeID')-> - where('vendorDBID', '=', $user->vendorDBID)-> + join('ObjectType', 'ObjectSell.object_type_id', '=', 'ObjectType.id')-> + where('vendor_user_id', '=', $user->vendor_user_id)-> select('ObjectSell.*', 'ObjectType.name') ->get(); diff --git a/IES-Bandung/app/Model/GovUser.php b/IES-Bandung/app/Model/GovUser.php index c0e98b6..8e9682e 100644 --- a/IES-Bandung/app/Model/GovUser.php +++ b/IES-Bandung/app/Model/GovUser.php @@ -12,12 +12,12 @@ class GovUser extends Model public function createNewGovUser($userID, $nip) { return $this->$insert(array( - 'userID' => $userID, + 'id' => $userID, 'nip' => $nip )); } public function getFullProfile($userID) { - return $this->join('users', 'users.id', '=', 'GovUser.userID')->where('GovUser.userID', '=', $userID)->get(); + return $this->join('users', 'users.id', '=', 'GovUser.id')->where('GovUser.id', '=', $userID)->get(); } } diff --git a/IES-Bandung/app/Model/ObjectSell.php b/IES-Bandung/app/Model/ObjectSell.php index b3d7033..280ef2d 100644 --- a/IES-Bandung/app/Model/ObjectSell.php +++ b/IES-Bandung/app/Model/ObjectSell.php @@ -9,15 +9,15 @@ class ObjectSell extends Model // protected $table = 'ObjectSell'; - public function createNewObjectSell($vendorDBID, $name, $objectTypeID) { + public function createNewObjectSell($vendorUserID, $name, $objectTypeID) { return $this->insert(array( - 'vendorDBID' => $vendorDBID, + 'vendor_user_id' => $vendorUserID, 'name' => $name, - 'objectTypeID' => $objectTypeID + 'object_type_id' => $objectTypeID )); } - public function getAllObjectSell($vendorDBID) { - return $this->join('ObjectType', 'ObjectSell.objectTypeID', '=', 'ObjectType.objectTypeID')->where('vendorDBID', '=', $vendorDBID)->get(); + public function getAllObjectSell($vendorUserID) { + return $this->join('ObjectType', '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 7555cb6..2011d5a 100644 --- a/IES-Bandung/app/Model/ObjectSellRateAndReview.php +++ b/IES-Bandung/app/Model/ObjectSellRateAndReview.php @@ -9,25 +9,25 @@ class ObjectSellRateAndReview extends Model // $table = 'ObjectSellRateAndReview'; - public function createOSRR($objectSellID, $publicDBID, $rating_val, $review_msg) { + public function createOSRR($objectSellID, $publicUserID, $rating_val, $review_msg) { return $this->insert(array( - 'objectSellID' => $objectSellID, - 'publicDBID' => $publicDBID, + 'object_sell_id' => $objectSellID, + 'public_user_id' => $publicUserID, 'rating_val' => $rating_val, 'review_msg' => $review_msg )); } - public function getAllOSRRbyPublicUser($publicDBID) { - return $this->where('publicDBID', '=', $publicDBID)->get(); + public function getAllOSRRbyPublicUser($publicUserID) { + return $this->where('public_user_id', '=', $publicUserID)->get(); } public function getAllOSRRbyObjectSellID($objectSellID) { - return $this->where('objectSellID', '=', $objectSellID)->get(); + return $this->where('object_sell_id', '=', $objectSellID)->get(); } - public function updateOSRR($osrrID, $rating_val, $review_msg) { - return $this->where('osrrID', '=', $osrrID)->update(array( + public function updateOSRR($id, $rating_val, $review_msg) { + return $this->where('id', '=', $id)->update(array( 'rating_val' => $rating_val, 'review_msg' => $review_msg )); diff --git a/IES-Bandung/app/Model/PublicUser.php b/IES-Bandung/app/Model/PublicUser.php index 174ac73..a017a1a 100644 --- a/IES-Bandung/app/Model/PublicUser.php +++ b/IES-Bandung/app/Model/PublicUser.php @@ -16,6 +16,6 @@ class PublicUser extends Model } public function getFullProfile($username) { - return $this->join('users', 'users.id', '=', 'PublicUser.userID')->where('users.username', '=', $username)->get(); + return $this->join('users', 'users.id', '=', 'PublicUser.id')->where('users.username', '=', $username)->get(); } } diff --git a/IES-Bandung/app/Model/VendorRateAndReview.php b/IES-Bandung/app/Model/VendorRateAndReview.php index 11dfffe..609f12d 100644 --- a/IES-Bandung/app/Model/VendorRateAndReview.php +++ b/IES-Bandung/app/Model/VendorRateAndReview.php @@ -9,25 +9,25 @@ class VendorRateAndReview extends Model // $table = 'VendorRateAndReview'; - public function createNewVRR($publicDBID, $vendorDBID, $rating_val, $review_msg) { + public function createNewVRR($publicUserID, $vendorUserID, $rating_val, $review_msg) { return $this->insert(array( - 'publicDBID' => $publicDBID, - 'vendorDBID' => $vendorDBID, + 'public_user_id' => $publicUserID, + 'vendor_user_id' => $vendorUserID, 'rating_val' => $rating_val, 'review_msg' => $review_msg )); } - public function getAllVRRbyPublicUser($publicDBID) { - return $this->where('publicDBID', '=', $publicDBID)->get(); + public function getAllVRRbyPublicUser($publicUserID) { + return $this->where('public_user_id', '=', $publicUserID)->get(); } - public function getAllVRRbyVendorUser($vendorDBID) { - return $this->where('vendorDBID', '=', $vendorDBID)->get(); + public function getAllVRRbyVendorUser($vendorUserID) { + return $this->where('vendor_user_id', '=', $vendorUserID)->get(); } - public function updateVRR($vrrID, $rating_val, $review_msg) { - return $this->where('vrrID', '=', $vrrID)->update(array( + public function updateVRR($id, $rating_val, $review_msg) { + return $this->where('id', '=', $id)->update(array( 'rating_val' => $rating_val, 'review_msg' => $review_msg )); diff --git a/IES-Bandung/app/Model/VendorUser.php b/IES-Bandung/app/Model/VendorUser.php index 99f8259..9f8a580 100644 --- a/IES-Bandung/app/Model/VendorUser.php +++ b/IES-Bandung/app/Model/VendorUser.php @@ -10,7 +10,7 @@ class VendorUser extends Model protected $table = 'VendorUser'; public function getFullProfile($userID) { - return $this->join('users', 'users.id', '=', 'VendorUser.userID')->where('VendorUser.userID', '=', $userID)->first(); + return $this->join('users', 'users.id', '=', 'VendorUser.id')->where('VendorUser.id', '=', $userID)->first(); } public function createNewVendorUser($userID, $place) { @@ -20,7 +20,7 @@ class VendorUser extends Model } public function updateVendorplace($userID, $newplace) { - return $this->where($userID, '=', 'VendorUser.userID')->update(array( + return $this->where($userID, '=', 'VendorUser.id')->update(array( 'place' => $newplace )); } diff --git a/IES-Bandung/app/User.php b/IES-Bandung/app/User.php index 53e3a0b..c2e3df5 100755 --- a/IES-Bandung/app/User.php +++ b/IES-Bandung/app/User.php @@ -24,8 +24,8 @@ class User extends Authenticatable 'password', 'remember_token', ]; - public function changePassword($userID, $newPassword) { - return $this->where($userID, '=', 'users.id')->update(array( + public function changePassword($id, $newPassword) { + return $this->where($id, '=', 'users.id')->update(array( 'password' => bcrypt($newPassword) )); } @@ -34,8 +34,8 @@ class User extends Authenticatable return $this->where('username', $username)->first(); } - public function updatetel_no($userID, $newtel_no) { - return $this->where('users.id', '=', $userID)->update(array( + public function updatetel_no($id, $newtel_no) { + return $this->where('users.id', '=', $id)->update(array( 'tel_no' => $newtel_no )); } 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 59375b8..5906ad1 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 @@ -14,11 +14,11 @@ class GovUser extends Migration { Schema::create('GovUser', function (Blueprint $table) { // - $table->increments('govDBID'); - $table->integer('userID')->unsigned(); + $table->increments('id'); + $table->integer('user_id')->unsigned(); $table->bigInteger('nip')->unsigned()->unique(); $table->string('ip_addr'); - $table->foreign('userID')->references('id')->on('users'); + $table->foreign('user_id')->references('id')->on('users'); $table->timestamps(); }); } 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 3dbc84d..7f7d5fd 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 @@ -14,11 +14,11 @@ class VendorUser extends Migration { Schema::create('VendorUser', function (Blueprint $table) { // - $table->increments('vendorDBID'); - $table->integer('userID')->unsigned(); + $table->increments('id'); + $table->integer('user_id')->unsigned(); $table->mediumText('place'); $table->string('ip_addr'); - $table->foreign('userID')->references('id')->on('users'); + $table->foreign('user_id')->references('id')->on('users'); $table->timestamps(); }); } 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 1e07628..9ee333f 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 @@ -14,10 +14,10 @@ class PublicUser extends Migration { Schema::create('PublicUser', function (Blueprint $table) { // - $table->increments('publicDBID'); - $table->integer('userID')->unsigned(); + $table->increments('id'); + $table->integer('user_id')->unsigned(); $table->string('ip_addr'); - $table->foreign('userID')->references('id')->on('users'); + $table->foreign('user_id')->references('id')->on('users'); $table->timestamps(); }); } 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 0889231..2085502 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 @@ -14,7 +14,7 @@ class ObjectType extends Migration { Schema::create('ObjectType', function (Blueprint $table) { // - $table->increments('objectTypeID'); + $table->increments('id'); $table->longText('name'); $table->string('ip_addr'); $table->timestamps(); 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 03db964..06fa11b 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 @@ -14,14 +14,14 @@ class ObjectSell extends Migration { Schema::create('ObjectSell', function (Blueprint $table) { // - $table->increments('objectSellID'); - $table->integer('vendorDBID')->unsigned(); + $table->increments('id'); + $table->integer('vendor_user_id')->unsigned(); $table->string('name'); - $table->integer('objectTypeID')->unsigned(); + $table->integer('object_type_id')->unsigned(); $table->integer('price')->unsigned(); $table->string('ip_addr'); - $table->foreign('vendorDBID')->references('vendorDBID')->on('VendorUser'); - $table->foreign('objectTypeID')->references('objectTypeID')->on('ObjectType'); + $table->foreign('vendor_user_id')->references('id')->on('VendorUser'); + $table->foreign('object_type_id')->references('id')->on('ObjectType'); $table->timestamps(); }); } 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 1681183..2d6bbfe 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 @@ -14,14 +14,14 @@ class ObjectSellRateAndReview extends Migration { Schema::create('ObjectSellRateAndReview', function (Blueprint $table) { // - $table->increments('osrrID'); - $table->integer('objectSellID')->unsigned(); - $table->integer('publicDBID')->unsigned(); + $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('objectSellID')->references('objectSellID')->on('ObjectSell'); - $table->foreign('publicDBID')->references('publicDBID')->on('PublicUser'); + $table->foreign('object_sell_id')->references('id')->on('ObjectSell'); + $table->foreign('public_user_id')->references('id')->on('PublicUser'); $table->timestamps(); }); } 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 deaa661..5f867ec 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 @@ -14,14 +14,14 @@ class VendorRateAndReview extends Migration { Schema::create('VendorRateAndReview', function (Blueprint $table) { // - $table->increments('vrrID'); - $table->integer('publicDBID')->unsigned(); - $table->integer('vendorDBID')->unsigned(); + $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('publicDBID')->references('publicDBID')->on('PublicUser'); - $table->foreign('vendorDBID')->references('vendorDBID')->on('VendorUser'); + $table->foreign('public_user_id')->references('id')->on('PublicUser'); + $table->foreign('vendor_user_id')->references('id')->on('VendorUser'); $table->timestamps(); }); } 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 9aa3cbe..2f7ccca 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 @@ -14,8 +14,8 @@ class GovUserLog extends Migration { Schema::create('GovUserLog', function (Blueprint $table) { $table->increments('id'); - $table->integer('govDBID')->unsigned(); - $table->integer('userID')->unsigned(); + $table->integer('gov_user_id')->unsigned(); + $table->integer('user_id')->unsigned(); $table->bigInteger('nip')->unsigned()->nullable(); $table->string('action'); $table->string('ip_addr'); 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 1dee62c..66e97c6 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 @@ -14,8 +14,8 @@ class VendorUserLog extends Migration { Schema::create('VendorUserLog', function (Blueprint $table) { $table->increments('id'); - $table->integer('vendorDBID')->unsigned(); - $table->integer('userID')->unsigned(); + $table->integer('vendor_user_id')->unsigned(); + $table->integer('user_id')->unsigned(); $table->mediumText('old_place')->nullable(); $table->mediumText('new_place')->nullable(); $table->string('action'); 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 a43de2d..dfd306c 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 @@ -14,8 +14,8 @@ class PublicUserLog extends Migration { Schema::create('PublicUserLog', function (Blueprint $table) { $table->increments('id'); - $table->integer('publicDBID')->unsigned(); - $table->integer('userID')->unsigned(); + $table->integer('public_user_id')->unsigned(); + $table->integer('user_id')->unsigned(); $table->string('action'); $table->string('ip_addr'); $table->timestamps(); 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 6da171c..e9d9cd1 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 @@ -14,7 +14,7 @@ class ObjectTypeLog extends Migration { Schema::create('ObjectTypeLog', function (Blueprint $table) { $table->increments('id'); - $table->integer('objectTypeID')->unsigned(); + $table->integer('object_type_id')->unsigned(); $table->longText('name'); $table->string('action'); $table->string('ip_addr'); 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 fb93002..4a60e38 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 @@ -14,10 +14,10 @@ class ObjectSellLog extends Migration { Schema::create('ObjectSellLog', function (Blueprint $table) { $table->increments('id'); - $table->integer('objectSellID')->unsigned(); - $table->integer('vendorDBID')->unsigned(); + $table->integer('object_sell_id')->unsigned(); + $table->integer('vendor_user_id')->unsigned(); $table->string('name'); - $table->integer('objectTypeID')->unsigned(); + $table->integer('object_type_id')->unsigned(); $table->integer('old_price')->unsigned()->nullable(); $table->integer('new_price')->unsigned()->nullable(); $table->string('action'); 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 0827c0e..82eff23 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 @@ -14,9 +14,9 @@ class ObjectSellRateAndReviewLog extends Migration { Schema::create('ObjectSellRateAndReviewLog', function (Blueprint $table) { $table->increments('id'); - $table->integer('osrrID')->unsigned(); - $table->integer('objectSellID')->unsigned(); - $table->integer('publicDBID')->unsigned(); + $table->integer('osrr_id')->unsigned(); + $table->integer('object_sell_id')->unsigned(); + $table->integer('public_user_id')->unsigned(); $table->integer('old_rating_val')->nullable(); $table->integer('new_rating_val')->nullable(); $table->longText('old_review_msg')->nullable(); 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 62f0636..c83b4e1 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 @@ -14,9 +14,9 @@ class VendorRateAndReviewLog extends Migration { Schema::create('VendorRateAndReviewLog', function (Blueprint $table) { $table->increments('id'); - $table->integer('vrrID')->unsigned(); + $table->integer('vrr_id')->unsigned(); $table->integer('publicDBID')->unsigned(); - $table->integer('vendorDBID')->unsigned(); + $table->integer('vendor_user_id')->unsigned(); $table->integer('old_rating_val')->nullable(); $table->integer('new_rating_val')->nullable(); $table->longText('old_review_msg')->nullable(); 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 120a9af..0f892df 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 @@ -14,7 +14,7 @@ class UserLog extends Migration { Schema::create('UserLog', function (Blueprint $table) { $table->increments('id'); - $table->integer('userID')->unsigned(); + $table->integer('user_id')->unsigned(); $table->string('username'); $table->string('email'); $table->string('old_password')->nullable(); 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 a1f07fe..cc04018 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 @@ -20,7 +20,7 @@ class UserLogAfterInsertTrigger extends Migration BEGIN INSERT INTO `UserLog` SET action = \'insert.a\', - userID = NEW.id, + user_id = NEW.id, username = NEW.username, email = NEW.email, old_password = NULL, diff --git a/IES-Bandung/database/migrations/2016_04_06_054018_user_log_after_update_trigger.php b/IES-Bandung/database/migrations/2016_04_06_054018_user_log_after_update_trigger.php index 9e94922..a85617b 100644 --- a/IES-Bandung/database/migrations/2016_04_06_054018_user_log_after_update_trigger.php +++ b/IES-Bandung/database/migrations/2016_04_06_054018_user_log_after_update_trigger.php @@ -20,7 +20,7 @@ class UserLogAfterUpdateTrigger extends Migration BEGIN INSERT INTO `UserLog` SET action = \'update.a\', - userID = NEW.id, + user_id = NEW.id, username = NEW.username, email = NEW.email, old_password = OLD.password, 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 7e78ab8..5dc3fd2 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 @@ -20,8 +20,8 @@ class PublicUserLogAfterInsertTrigger extends Migration BEGIN INSERT INTO `PublicUserLog` SET action = \'insert.a\', - publicDBID = NEW.publicDBID, - userID = NEW.userID, + public_user_id = NEW.id, + user_id = NEW.user_id, ip_addr = NEW.ip_addr, updated_at = NEW.updated_at; END 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 4084a55..eec4861 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 @@ -20,8 +20,8 @@ class GovUserLogAfterInsertTrigger extends Migration BEGIN INSERT INTO `GovUserLog` SET action = \'insert.a\', - govDBID = NEW.govDBID, - userID = NEW.userID, + gov_user_id = NEW.gov_user_id, + user_id = NEW.user_id, nip = NEW.nip, ip_addr = NEW.ip_addr, updated_at = NEW.updated_at; 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 db7e514..0336334 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 @@ -20,8 +20,8 @@ class VendorUserLogAfterInsertTrigger extends Migration BEGIN INSERT INTO `VendorUserLog` SET action = \'insert.a\', - vendorDBID = NEW.vendorDBID, - userID = NEW.userID, + vendor_user_id = NEW.id, + user_id = NEW.user_id, old_place = NULL, new_place = NEW.place, ip_addr = NEW.ip_addr, 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 9dd378b..06e4331 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 @@ -20,8 +20,8 @@ class VendorUserLogAfterUpdateTrigger extends Migration BEGIN INSERT INTO `VendorUserLog` SET action = \'update.a\', - vendorDBID = NEW.vendorDBID, - userID = NEW.userID, + vendor_user_id = NEW.id, + user_id = NEW.user_id, old_place = OLD.place, new_place = NEW.place, ip_addr = NEW.ip_addr, 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 9165e0e..abe0c75 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 @@ -20,7 +20,7 @@ class ObjectTypeLogAfterInsertTrigger extends Migration BEGIN INSERT INTO `ObjectTypeLog` SET action = \'insert.a\', - objectTypeID = NEW.objectTypeID, + object_type_id = NEW.id, name = NEW.name, ip_addr = NEW.ip_addr, updated_at = NEW.updated_at; 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 2713797..9565fa6 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 @@ -20,10 +20,10 @@ class ObjectSellLogAfterInsertTrigger extends Migration BEGIN INSERT INTO `ObjectSellLog` SET action = \'insert.a\', - objectSellID = NEW.objectSellID, - vendorDBID = NEW.vendorDBID, + object_sell_id = NEW.id, + vendor_user_id = NEW.vendor_user_id, name = NEW.name, - objectTypeID = NEW.objectTypeID, + object_type_id = NEW.object_type_id, old_price = NULL, new_price = NEW.price, ip_addr = NEW.ip_addr, 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 0291e42..01d6f77 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 @@ -20,10 +20,10 @@ class ObjectSellLogAfterUpdateTrigger extends Migration BEGIN INSERT INTO `ObjectSellLog` SET action = \'update.a\', - objectSellID = NEW.objectSellID, - vendorDBID = NEW.vendorDBID, + object_sell_id = NEW.id, + vendor_user_id = NEW.vendor_user_id, name = NEW.name, - objectTypeID = NEW.objectTypeID, + object_type_id = NEW.object_type_id, old_price = OLD.price, new_price = NEW.price, ip_addr = NEW.ip_addr, 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 157b6db..98370fd 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 @@ -20,9 +20,9 @@ class ObjectSellRateAndReviewLogAfterInsertTrigger extends Migration BEGIN INSERT INTO `ObjectSellRateAndReviewLog` SET action = \'insert.a\', - osrrID = NEW.osrrID, - objectSellID = NEW.objectSellID, - publicDBID = NEW.publicDBID, + osrr_id = NEW.id, + object_sell_id = NEW.object_sell_id, + public_user_id = NEW.public_user_id, old_rating_val = NULL, new_rating_val = NEW.rating_val, old_review_msg = NULL, 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 57e5978..d1924df 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 @@ -20,9 +20,9 @@ class ObjectSellRateAndReviewLogAfterUpdateTrigger extends Migration BEGIN INSERT INTO `ObjectSellRateAndReviewLog` SET action = \'update.a\', - osrrID = NEW.osrrID, - objectSellID = NEW.objectSellID, - publicDBID = NEW.publicDBID, + osrr_id = NEW.id, + object_sell_id = NEW.object_sell_id, + public_user_id = NEW.public_user_id, old_rating_val = OLD.rating_val, new_rating_val = NEW.rating_val, old_review_msg = OLD.review_msg, 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 889a6eb..af67c16 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 @@ -20,9 +20,9 @@ class VendorRateAndReviewLogAfterInsertTrigger extends Migration BEGIN INSERT INTO `VendorRateAndReviewLog` SET action = \'insert.a\', - vrrID = NEW.vrrID, - publicDBID = NEW.publicDBID, - vendorDBID = NEW.vendorDBID, + vrr_id = NEW.id, + public_user_id = NEW.public_user_id, + vendor_user_id = NEW.vendor_user_id, old_rating_val = NULL, new_rating_val = NEW.rating_val, old_review_msg = NULL, 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 4c95679..720b54b 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 @@ -20,9 +20,9 @@ class VendorRateAndReviewLogAfterUpdateTrigger extends Migration BEGIN INSERT INTO `VendorRateAndReviewLog` SET action = \'insert.a\', - vrrID = NEW.vrrID, - publicDBID = NEW.publicDBID, - vendorDBID = NEW.vendorDBID, + vrr_id = NEW.id, + public_user_id = NEW.public_user_id, + vendor_user_id = NEW.vendor_user_id, old_rating_val = OLD.rating_val, new_rating_val = NEW.rating_val, old_review_msg = OLD.review_msg, -- GitLab