weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
612 stars 85 forks source link

Migrations in multiple schemas do not work if migrations-table is not schema qualified #123

Open bentomi opened 6 years ago

bentomi commented 6 years ago

If the name of the migration table is not qualified, ragtime will accept any table of the same name in any schema, ignoring the schema set for the connection (see ragtime.jdbc/metadata-matches-table?).

Wouldn't it make sense to search only the schema specified for the table name as qualifier or, if the name is not qualified, the schema returned by (.getSchema conn)? I expect, that tables found in other schemas will be useless anyway as any insertions will fail.