Database: Migrations - Laravel - The PHP Framework For Web ...
laravel.com › docs › 8To drop an existing table, you may use the drop or dropIfExists methods: Schema::drop('users'); Schema::dropIfExists('users'); Renaming Tables With Foreign Keys. Before renaming a table, you should verify that any foreign key constraints on the table have an explicit name in your migration files instead of letting Laravel assign a convention based name.
Laravel migrations: dropping a specific table - Stack Overflow
stackoverflow.com › questions › 37249235May 16, 2016 · You can of course just drop and not check for existence: Schema::drop ('my_table'); Read further in the docs here: https://laravel.com/docs/5.2/migrations#writing-migrations. You may also have to consider dropping any existing foreign keys/indexes, for example if you wanted to drop a primary key: public function up () { Schema::table ('my_table', function ($table) { $table->dropPrimary ('my_table_id_primary'); }); Schema::dropIfExists ('my_table'); }