Laravel 5 - skip migrations

I migrated an existing Laravel 5 application and database. There was no migration table yet, so I created it with the following command:

php artisan migrate:install

There are three files in the database migration folders (2015_12_08_134409_create_tables_script.php, 2015_12_08_134410_create_foreign.php, 2015_12_08_134411_create_index.php)

When using "php artisan migrate" scripts inside the migration folder are executed again. I want to avoid that. Is it possible to insert records into the Laravel migration table, so these scripts will be skipped and new scripts will be collected after "php artisan migrate" is executed again?

+4
source share
1 answer

:

insert into migrations(migration, batch) values('2015_12_08_134409_create_tables_script',1);
insert into migrations(migration, batch) values('2015_12_08_134410_create_foreign',1);
insert into migrations(migration, batch) values('2015_12_08_134411_create_index',1);

, ""

+7

Source: https://habr.com/ru/post/1626755/


All Articles