Skip to content

Commit

Permalink
Update 2017_04_05_103357_alter_id_in_transactions_table.php
Browse files Browse the repository at this point in the history
  • Loading branch information
hpakdaman authored Apr 24, 2017
1 parent 0d236f2 commit 3877938
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public function up()
try {
DB::statement("ALTER TABLE `" . $this->getLogTable() . "` drop foreign key transactions_logs_transaction_id_foreign;");
DB::statement("ALTER TABLE `" . $this->getLogTable() . "` DROP INDEX transactions_logs_transaction_id_foreign;");
} catch (Exception $e) {

}

try {
DB::statement("update `" . $this->getTable() . "` set `payment_date`=null WHERE `payment_date`=0;");
DB::statement("ALTER TABLE `" . $this->getTable() . "` CHANGE `id` `id` BIGINT UNSIGNED NOT NULL;");
DB::statement("ALTER TABLE `" . $this->getLogTable() . "` CHANGE `transaction_id` `transaction_id` BIGINT UNSIGNED NOT NULL;");
Expand Down

0 comments on commit 3877938

Please sign in to comment.