Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#814 closed defect (fixed)

Move from sqlalchemy-migrate to Alembic

Reported by: Christopher Allan Webber Owned by:
Priority: blocker Milestone: 0.9.0
Component: programming Keywords:
Cc: berkerpeksag Parent Tickets: #5017

Description

sqlalchemy-migrate is unmaintained. This is a pretty big deal generally, but especially because we want to move to Python 3, and we can't without a way forward on migrations. Current sqlalchemy migration mindshare seems to be in Alembic, we should probably move that way?

The biggest barrier here is probably how much Alembic supports sqlite. We could really use someone to look into that.

Subtickets

Change History (15)

comment:1 Changed 6 years ago by berkerpeksag

Cc: berkerpeksag added

comment:2 Changed 6 years ago by Christopher Allan Webber

Milestone: 0.8.0
Owner: set to Christopher Allan Webber
Priority: majorblocker
Status: newin_progress

This is pretty much done, but needs to be fully reviewed, and possibly worked on. Berker also is going to complete documentation on how to write tests.

In the meanwhile, this feature is enabled on py3 only. I'll be reviewing it shortly.

comment:3 Changed 6 years ago by Christopher Allan Webber

Milestone: 0.8.00.9.0

I think the chance of Alembic becoming the default in this release is small, because py3 won't be "fully supported" by then (I could be wrong!) though it should be by 0.9.0.

comment:4 Changed 6 years ago by berkerpeksag

Is there a timeline for 0.8? I think new installations can use Alembic safely now. Perhaps migrating old installations to Alembic could be a little problem.

comment:5 Changed 6 years ago by berkerpeksag

Owner: changed from Christopher Allan Webber to berkerpeksag
Summary: Move from sqlalchemy-migrate to Alembic(?)Move from sqlalchemy-migrate to Alembic

comment:6 Changed 6 years ago by Christopher Allan Webber

Oh, that may be my mistake thinking there was something left to do.

We haven't figured out how to move old installations from sqlalchemy -> alembic, yes. That's a problem that needs to be addressed. Maybe it can still be done in this release. Someone would need to think about what the transition process for users would be, and make sure the codebase handles that transition. IIRC no such thing is handled at the moment...

I would be more than happy to get this closed in 0.8.0 if true, though.

comment:7 Changed 5 years ago by berkerpeksag

Owner: berkerpeksag deleted
Status: in_progressaccepted

comment:8 Changed 5 years ago by berkerpeksag

Parent Tickets: 5017

comment:9 Changed 5 years ago by Boris Bobrov

I've pushed branch alembic to the repository, please review and merge to master.

comment:10 Changed 5 years ago by Boris Bobrov

Status: acceptedreview

comment:11 Changed 5 years ago by Boris Bobrov

Nope, it was dumb of me to push it like this. Sorry, I had to re-push it and commit ids changed.

comment:12 Changed 5 years ago by Christopher Allan Webber

It looks like a clean switchover... I just gave it a test and it seems to be working nicely.

I think we can merge, but I want to talk to tsyesika first to see if there's any lingering sqlalchemy-migrate migrations in the wings first. Maybe we can get this merged by tomorrow?

Thanks for all your work on this, berker + breton! I'm looking forward to it finally landing.... :)

comment:13 Changed 5 years ago by Jessica Tallon

I'm psyched about the switched over, I do have one migration which is to add a few fields to the Activity model, I was waiting until after 0.8.2 was released and the freeze was over before I merge it. It's fairly small though, I can redo it in alembic, lets not hold up this merge :)

Excitedly looks forward to the days where a developer does not have to use sqlalchemy-migrate

comment:14 Changed 5 years ago by Christopher Allan Webber

Milestone: 0.9.00.8.2
Resolution: fixed
Status: reviewclosed

Alright then! Let's get this switchover party started! :)

Merged... at last! Time to throw a party! :)

comment:15 Changed 5 years ago by Christopher Allan Webber

Milestone: 0.8.20.9.0

All 0.8.2 tickets are being rolled over to 0.9.0

Note: See TracTickets for help on using tickets.