Answers for "laravel migration rollback foreign key"

PHP
1

laravel migration rollback

To rollback one step:

php artisan migrate:rollback

To rollback multiple steps:

php artisan migrate:rollback --step=[x]
  
To drop all tables and reload all migrations:

php artisan migrate:fresh
Posted by: Guest on December-01-2020
5

foreign key laravel migration

$table->foreign('column_name')->references('id')->on('table_name')->onDelete('cascade');
Posted by: Guest on February-05-2021
0

laravel migration drop foreign keys

$table->dropIndex(['state']); // Drops index 'geo_state_index'
Posted by: Guest on November-30-2020
0

laravel migration drop foreign keys

$table->dropPrimary('users_id_primary');
Posted by: Guest on November-30-2020

Code answers related to "laravel migration rollback foreign key"

Browse Popular Code Answers by Language