Future plans for DB schema changes

Søren Løvborg sorenl at unity3d.com
Wed May 18 13:11:31 UTC 2016


Alright, I've posted a provisional version of my Alembic work here:

    https://kallithea-scm.org/repos/kallithea/pull-request/40

This PR:
- removes SQLAlchemy Migrate database migration library
- removes remaining RhodeCode compatibility
- adds basic Alembic database migration support
- in a related move, also upgrades to SQLAlchemy 1.0 and adds
well-defined key/index/constraint naming (for new databases only...)

The changesets marked [4.0] are (more or less) ready and proposed for
inclusion in the upcoming 4.0 release. Even though they don't contain
complete Alembic support, and do not actually define any Alembic
migration scripts, they lay the necessary foundation for "going full
Alembic" down the road.

In particular, they contain the necessary tweaks to Kallithea config
.ini files, such that any Kallithea install made post 0.4 should "just
work". Older installs will have to tweak their config as detailed in
the docs.

Remaining work (beyond the marked WIP changesets):
- Tests, tests, tests.
- Determine Alembic best practices, so we can start accepting database changes.
- Use Alembic to clean up old cruft in the database.

I recommend reviewing individual changesets. Feel free to comment here
on the mailing list.

Best,
Søren

On Tue, May 17, 2016 at 1:31 PM, Søren Løvborg <sorenl at unity3d.com> wrote:
> I've been making some progress on Alembic, yes, though it has been
> going slowly due to other commitments.
>
> I hope to show something soon-ish.
>
> I'll also look at Dominik's Alembic changes and how it meshes with my approach.
>
> Best,
> Søren
>
>
> On Mon, May 16, 2016 at 1:35 PM, Thomas De Schampheleire
> <patrickdepinguin at gmail.com> wrote:
>>
>> On May 16, 2016 12:21, "Andrew Shadura" <andrew at shadura.me> wrote:
>>>
>>> On 16 May 2016 at 11:08, Mads Kiilerich <mads at kiilerich.com> wrote:
>>> > On 05/16/2016 12:02 PM, Dominik Ruf wrote:
>>> >>
>>> >> Hello all,
>>> >>
>>> >> I wanted to ask what to future plan for DB schema changes are.
>>> >
>>> >
>>> > We have very little confidence in the existing database migration
>>> > functionality.
>>>
>>> Even though we do, I think we should just start using whatever
>>> non-perfect solution we have until we've got something that's better.
>>> We've been waiting for a better DB schema and migration code for
>>> almost two years already, I think that's a bit too much.
>>
>> Wasn't Søren making progress on Alembic?


More information about the kallithea-general mailing list