DBMigrations.runmigrationsMethod
DBMigrations.runmigrations(conn::DBInterface.Connection, dir::String)

Using an established database connection conn (which should have the appropriate schema already selected), search the directory dir for migration files and apply them to the database. Migration files should be named like V1__baseline.sql, V2__latlong.sql, etc. where they must start with a capital V followed by a number, followed by two underscores, followed by a description of the migration. The number must be unique across all migrations. The description can be anything, but should be descriptive of the migration. The file extension currently must be .sql.

Migration files found in dir will be checked against a special flyway_schema_history table that the DBMigrations.jl package manages in the database connection for tracking which migrations have already been applied. If a migration file is found in dir that has not been applied, it will be applied to the database. If a migration file is found in dir that has already been applied, it will be skipped. If a migration file is found in dir that has been applied but has changed since it was applied, an error will be thrown (migrations should be immutable once applied).

Migration files may contain multiple SQL statements, separated by semicolons. Each statement will be executed in order. If any statement fails, the entire migration will be rolled back and an error will be thrown. If a migration file contains a syntax error, the migration will be rolled back and an error will be thrown.