Opened 9 years ago
Closed 9 years ago
#5424 closed defect (fixed)
Alembic migrations with plugins
Reported by: | Christopher Allan Webber | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.9.0 |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: |
Description
Currently plugins still use sqlalchemy-migrate. In order for our move to Alembic to be complete, and to remove sqlalchemy-migrate support, we need to figure out how to do migrations for plugins with Alembic.
I've been told that branching from multiple bases is the right route to go, but someone needs to research it further.
Change History (3)
comment:1 by , 9 years ago
Milestone: | 1.0 → 0.9.0 |
---|---|
Owner: | set to |
Status: | new → in_progress |
comment:2 by , 9 years ago
Progress on this... I've created a branch for this and #5413. As of commit b1a24c7d18ca7e43a552bd864f148cf16512d612, plugins can have their own migrations. Simply make a "migrations" subdirectory in your plugin's directory and put the code there. "gmg dbupdate" will find them appropriately and do the migrations.
This could be merged now, though it has not documentation so I consider it to be incomplete. It also makes use of Alembic's branching model, and theoretically this will become an important thing moving into the future, so we want to make sure that we document how that works and ties in with our code clearly.
comment:3 by , 9 years ago
Owner: | removed |
---|---|
Resolution: | → fixed |
Status: | in_progress → closed |
I've pushed the documentation changes for this! So this will be merged in with #5413 in just a few.
tsyesika convinced me this shouldn't wait, so I guess this is going on 0.9.0. I'll work on it (though if someone's really gearing up to do it, let me know)