diff --git a/IES-Bandung/app/Http/Controllers/VendorUserController.php b/IES-Bandung/app/Http/Controllers/VendorUserController.php index 245bd0f17ac6532d8318d5133af40c06f1579698..fced3066de920779ad78b2aa91e961d3a8e3a539 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 8e9682e6289df30049d2363465e6010b9982039b..ee852fe8934ce0422ac4da22e1ccf9f4a464b36e 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 280ef2dfe015af11ca30997cf4611a8335835314..37f364e2e91979ab747e93092edeffcf55c3695a 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 2011d5addc321a94ccaf084625eaf3f8302f9b4a..ad5c1194a66c9b293d92a0de231209bca8c62ff7 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 a291c1af54e0fd622625b7d4ce964e0b3b4e2a31..82088160681da675f60e5819f87bfd29ac9bf8f6 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 a017a1a40d79fbc59181290b875cf5490d838bcd..0f242f718e6f88ee0bddc5725597cd64a00949f0 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 609f12dbbce063585268197aa5ab2a5b37f9d233..1b4c90fa80c28b9757089deadb43df8db8bdb234 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 4e49c409eb548e4344839bb48e18ceaa9e5f8aa8..776aa447136c679dfb4ab57b4eeddcf71dee4ce4 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 5906ad1529fe7b436c0d8a2c302e3007b7b995f3..7f60d17cf57b72c597676d14d6513cc6372ffc69 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 7f7d5fd1adee9ccc1928108ca3aac4e798ae9c43..f620486c6f3802ec65034ac97234053521090e0a 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 9ee333f1ccd689507acae109abbc576457092d7c..cf47f04f3ae199b6f2251f88fba05f0d66c21b1c 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 2085502d3d1ddb348e5b5e8ffa106d6aed615861..e4f037a2468ce57719267a46ae7a60f5b032f01e 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 06fa11bebe8d421c6bb623307b16dc01ed59a294..df08559cec03df9451b90930022361e35a468631 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 2d6bbfe01f08566ebe3566a3c61a1d144acd2d96..ba638741cc5d009fdeeebde64fb6bcd7a749638d 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 5f867ecb6d29906a2dda24944073446a885b21e9..293480e9a19c3f24ed35a8a6b2f3fa3fbaf39ada 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 2f7ccca3267dfd13a2e1aa22f6606ada97d65dcb..4efd6fd2ff9487ed07fe69ff0ba963ca2dac13b3 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 66e97c67b9e61f30cd6dd54247125c8cfb47c11a..dd511b8e0b218c8cb600dfa6045f1370b4f1438f 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 dfd306c72e0296c6c15d8663aaf927ce68c9d62b..1700a3ea963ac634eef1659a6f3039ccc65f57b8 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 e9d9cd14f1f90206fc1e9c2dbe7e38f00a902706..5395662dfc00450178a7d93c24b229c336ea4a36 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 4a60e38091ceedc8f1e80a52d9886ddef7a47550..f7417f4053eff8e824382fd5ae1dcf2e66573b3a 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 82eff231ce06d63bd8f30557339906053586d575..dcd2c8c9bf94e50e27e599f3a2c123eb40fb0865 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 c83b4e1bafcea1473cd86c9a45613d27d75deecb..a01c1814bd8ffe8374fa3911c2e9a79b11c22a09 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 0f892df95de8c043e99f508a0a4ff2cff8d2fc9a..00213ca00811887439c4436fe060c08fbcce895f 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 cc040185b6bfe34fa25ee05347b1d131d88f08af..c82f471acc71cb83e91d534066fadc8a4581ae01 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 5dc3fd2e4ffa9f7ae4c675dd5ffd553a79679ff2..bb7fbff4ec0ea0ede1a6c852b0a353f59650aa28 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 6f9501a1273395b8a7544f0af040d11b8a32b03b..31cf1ab80bd124494ac95ed71fd64185abc3e3c5 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 033633440f15c4ec9cf8796254c1bf266f9b72be..a1c50eb7202df79402e7cbecc715aa53dd9f8dc6 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 06e4331d7ae144801ba326368834413c52761431..6910083a233164303d8f0bc30a484d4834722a0a 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 abe0c7511abb19d8d7387d9c463e62e28431aa02..ed931c79088faea10de7c85d5eef20ee0f861c5e 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 9565fa63d180202f8358402e00a7ebc08bc74178..2714004ea49e6e7381b27ce2a37ea62eaf54c38a 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 01d6f77db328ec38e9324a075de52d534afa62d0..47d1209f41dcb1fb21a302a52893ee18dd2b9997 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 98370fd35d91e7ceb672031b6b6cca8406d74a9f..f42d975ecfd36df593b690450be3c6a18d0a5cf4 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 d1924dfde3f057ac6d56eda918d398a7c836a889..20c725a6d475030457dc2c43c6332d534300ee4d 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 af67c167e3a96a7cf2eef1e1beecbdbd11525104..a3bdeab539f4dc7e5529b3a9612f3d95fffb9046 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 720b54b76eb00939b6bdcd15e11019cc89671739..b7e8ceece302a357d435f2b727742b22d9279f3c 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`'); } }