Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix base migration to check if table already exists
Currently the base schema migration assumes that the "elastic_migrations" table does not exist. This is problematic when restoring a schema from a schema:dump with prune: `php artisan schema:dump --prune` When you run `php artisan migrate`, Laravel restores the schema dump in database/schema. However, if you then try to run a migration, the elastic-migrations library attempts to run its migrations, but throws an error because the table already exists via the schema being restored. `SQLSTATE[42P07]: Duplicate table: 7 ERROR: relation "elastic_migrations" already exists (SQL: create table "elastic_migrations" ("migration" varchar(255) not null, "batch" integer not null))`
- Loading branch information