Opened 8 years ago

Closed 8 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 Christopher Allan Webber, 8 years ago

Milestone: 1.00.9.0
Owner: set to Christopher Allan Webber
Status: newin_progress

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)

comment:2 by Christopher Allan Webber, 8 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 Christopher Allan Webber, 8 years ago

Owner: Christopher Allan Webber removed
Resolution: fixed
Status: in_progressclosed

I've pushed the documentation changes for this! So this will be merged in with #5413 in just a few.

Note: See TracTickets for help on using tickets.