-
Notifications
You must be signed in to change notification settings - Fork 39
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
runAfterCreateDatabase are run even if database isn't created from scratch by grate #536
Comments
I have the same issue. I have a RoundhousE database, running Grate did create the Grate tables (GrateScriptsRun etc), but even with them, grate.sqlserver is still trying to execute the runAfterCreateDatabase scripts. Logs:
|
Yes, this just looks like a plain old bug. The name of the folder does not equal the name of this constant. The folder configuration is a bit messy, and due for a rewrite. But, I think I see the problem, and can provide a work-around for this now, with out re-writing the whole folder configuration right now. |
…isn't created from scratch by grate * Wrote tests demonstrating the problem * Introduced "Key" in MigrationsFolder * Check on this to see if the folder is the "RunAfterCreateDatabase" folder
…isn't created from scratch by grate * Wrote tests demonstrating the problem * Introduced "Key" in MigrationsFolder * Check on this to see if the folder is the "RunAfterCreateDatabase" folder
…isn't created from scratch by grate * Wrote tests demonstrating the problem * Introduced "Key" in MigrationsFolder * Check on this to see if the folder is the "RunAfterCreateDatabase" folder * Use Sql server on Ubuntu 22.04 for testing - the 20.04 one doesn't seem to work for CU14 (2024.07.23)
…isn't created from scratch by grate (#565) * Bug #536: Run After Create Database scripts are run even if database isn't created from scratch by grate * Wrote tests demonstrating the problem * Introduced "Key" in MigrationsFolder * Check on this to see if the folder is the "RunAfterCreateDatabase" folder * Use Sql server on Ubuntu 22.04 for testing - the 20.04 one doesn't seem to work for CU14 (2024.07.23) * 2019-CU26-ubuntu-20.04
Describe the bug
Documentation states:
However, when running grate against a backup of an existing database (not created by grate, does not contain any grate tables):
After
I would not be expecting
The database was not created from scratch by grate, so why is it running the scripts in this folder?
To Reproduce
Expected behavior
I would expect grate to skip these scripts as the database already existed prior to the run.
Desktop
Additional context
Am I misunderstanding the documentation? Do the grate tables need to exist beforehand for grate to not run runAfterCreateDatabase-scripts?
In my case there are no other scripts (or folders) present than the ones in runAfterCreateDatabase.
The text was updated successfully, but these errors were encountered: