Skip to content

Conversation

aaronweeden
Copy link
Contributor

@aaronweeden aaronweeden commented Feb 26, 2025

Description

This PR adds the ability to add additional database migration classes by defining them in the same namespace and ending their names with DatabasesMigration.

This is useful for, e.g., ubccr/xdmod-ondemand#84.

Tests performed

I tested ubccr/xdmod-ondemand#84 in tandem with this PR.

@aaronweeden aaronweeden added this to the 11.0.1 milestone Feb 26, 2025
@aaronweeden aaronweeden marked this pull request as ready for review February 27, 2025 15:29
@jpwhite4
Copy link
Member

jpwhite4 commented Mar 3, 2025

I don't thinkit is a good idea to hardcode submodule names into the core. How about just have the code detect any database migrations classes and run them automatically. (run the additional migrations in alphabetical order by classname so that migrations are deterministic)

@aaronweeden aaronweeden changed the title Add ability to run module database migrations. Add ability to add additional database migration classes. Mar 4, 2025
@aaronweeden aaronweeden force-pushed the add-module-database-migrations branch from ddf4a00 to 9420858 Compare March 5, 2025 14:11
@aaronweeden aaronweeden requested a review from jpwhite4 March 5, 2025 14:42
@aaronweeden
Copy link
Contributor Author

I don't thinkit is a good idea to hardcode submodule names into the core. How about just have the code detect any database migrations classes and run them automatically. (run the additional migrations in alphabetical order by classname so that migrations are deterministic)

@jpwhite4 I have updated this.

@aaronweeden aaronweeden force-pushed the add-module-database-migrations branch from ced7394 to 941d3a3 Compare March 7, 2025 16:39
@aaronweeden aaronweeden merged commit 54edae6 into ubccr:xdmod11.0 Mar 7, 2025
4 checks passed
@aaronweeden aaronweeden deleted the add-module-database-migrations branch March 7, 2025 16:56
aaronweeden added a commit to aaronweeden/xdmod that referenced this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants