-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema create/drop in DB2 zOS #69
Comments
Hi @alistair-RG , in DB2 for z/OS, a schema is not something you can create or drop. It is just used as a qualifier (comparable to a namespace) for named database objects such as tables, indexes etc. See https://www.ibm.com/docs/en/zos-basic-skills?topic=structures-db2-schemas-schema-qualifiers. Creating a new flyway "schema" works without explicitly creating the database schema. So what you wrote under "Why does this matter" is not valid. There may be some z/OS security pre-conditions though, to allow you to create/manage objects under some schema-qualifier or database:
|
Ah - thanks for that. Do you think the exception in the doCreate method is too enthusiastic and it ought to just be a log ? For example SQLite does it this way |
Well, I've never hit these exceptions, even when starting on a blank environment or after calling flyway clean. Note that DB2ZSchema.doExists will return true whenever the configured database exists (this database should have been created by a DBA before starting to deploy schema's) But if you prefer, we could change it into a log statement like done for SQLite, indeed. |
Currently the driver can't create or drop schemas directly (see DB2ZSchema.java )
If you define defaultSchema or schemas then:
Why does it matter ?
If you want to put the schema history table in a specific schema (that doesn't yet exist) then Flyway is unable to do this
What are the alternatives ?
Related information
The text was updated successfully, but these errors were encountered: