Created
December 9, 2017 07:11
-
-
Save andri-sudarmawijaya/634afd5814adc5bc4077b73d2e3bc204 to your computer and use it in GitHub Desktop.
Drop foreign key when php artisan down
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function down() | |
{ | |
Schema::table('todolists', function(Blueprint $table) | |
{ | |
$table->dropForeign('todolists_category_id_foreign'); | |
$table->dropColumn('category_id'); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment