[pgadmin-hackers] Introduce Migration system for SQLite database - Mailing list pgadmin-hackers

From Joao Pedro De Almeida Pereira
Subject [pgadmin-hackers] Introduce Migration system for SQLite database
Date
Msg-id CAE+jjamL01hnr5zgjYztgFPR2WSSUoZDWsjeDUN1AQTGJ5csVg@mail.gmail.com
Whole thread Raw
Responses Re: [pgadmin-hackers] Introduce Migration system for SQLite database
List pgadmin-hackers
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?
Can we safely assume that everyone is in version 14 of the database?

--
Thanks
Joao & Sarah

pgadmin-hackers by date:

Previous
From: Ashesh Vashi
Date:
Subject: [pgadmin-hackers] pgAdmin 4 commit: Resolved an issue finding the python interpreter on*
Next
From: Catonano
Date:
Subject: [pgadmin-hackers] hello (and .git folder)