Skip to content

2.0.0

Choose a tag to compare

@BJNSTNKVC BJNSTNKVC released this 16 Sep 12:18
· 19 commits to master since this release

Breaking

  • A migration's default name is now its class name in snake case, the way Laravel names a migration file. CreateUsersTable is recorded as create_users_table instead of CreateUsersTable.

  • A database migrated with 1.0.0 recorded the old class names, so it will throw MigrationMismatchException on its next boot. To keep an existing database working, override name() on each migration that already ran and return the name it was recorded under:

    class CreateUsersTable extends Migration {
        override name(): string {
            return 'CreateUsersTable';
        }
    }
  • An overridden name() is still used as is.

Changed

  • DB.status(), DB.migrate(), DB.fresh() and the migration events now report migration names in snake case.