-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
FIX: Create readonly functions during backup #7981
Conversation
You've signed the CLA, gschlager. Thank you! This pull request is ready for review. |
Does this mean in the future we must create the constants |
Yes, exactly. I couldn't think of another way of knowing which functions to create. Now that you mention it I could add a spec that ensures that post migrations contain the right constants when |
Temporarily recreate already dropped functions in the discourse_functions schema in order to allow restoring of backups which still reference dropped functions.
76cfe42
to
a098788
Compare
I went ahead and added specs to check the post migrations. |
This is definitely better, but I wonder if there's a way we could query directly as a result of the ColumnDropper calls? Could those calls set some class variables in a certain context and then allow us to check those variables? |
That's actually a good idea! The migrations aren't running during the restore, but I guess I could load them as I do right now and execute the |
Actually, that won't work. There's other code in some of those migrations and I can't blindly execute all post migrations. :/ |
Ah too bad. Was worth a look though! |
Temporarily recreate already dropped functions in the discourse_functions schema in order to allow restoring of backups which still reference dropped functions.