Re: Introduce Migration system for SQLite database

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Joao Pedro De Almeida Pereira <jpereira(at)pivotal(dot)io>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Sarah McAlear <smcalear(at)pivotal(dot)io>
Subject: Re: Introduce Migration system for SQLite database
Date: 2017-03-13 09:03:43
Message-ID: CA+OCxozsf9XXxBgsTuCG54=9wb9OE1r-_7zfisYiT5kd041X0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Fri, Mar 10, 2017 at 4:39 PM, Joao Pedro De Almeida Pereira
<jpereira(at)pivotal(dot)io> wrote:
> Hi Hackers,
> We were looking at the migration pattern created for the SQLite database and
> tried to look into the possibility of using a library that could handle them
> for us.
>
> - Migrations allow us to have a single path of creating the table instead of
> creating tables using SQLAlchemy or hand rolled SQL. This pattern can cause
> issues because updated databases might be different than the ones created by
> SQLAlchemy
> - The version numbering for the migrations is tedious and error prone.
>
>
> After some research we found these 2 libraries(alembic, flask-migrate) that
> can run migrations for us.
>
> Alembic is a library written by the same person that wrote SQLAlchemy and is
> used to manage and run the migrations.
>
> Flask-migrate is the glue that joins Flask and Alembic allowing us to run
> the migrations directly in the code.
>
>
> What are your thoughts about this change?

I'm fine with it in principle, assuming that the upgrade process
remains transparent for users.

> Can we safely assume that everyone is in version 14 of the database?

Definitely not.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-03-13 10:39:06 Re: [pgAdmin4][Patch]: Fixed 2190 - Move language selection to Preferences.
Previous Message Dave Page 2017-03-10 23:03:21 Re: hello (and .git folder)