Laravel 5 - skip migrations

前端 未结 2 1838
暗喜
暗喜 2021-02-05 08:03

I have migrated an existing Laravel 5 application and database. Only no migrations table was there yet, so I created this with the following command:

php artisan         


        
2条回答
  •  旧巷少年郎
    2021-02-05 08:10

    Once you have the migration table created, insert these records:

    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);
    

    So artisan will understand those migrations as 'executed'

提交回复
热议问题