Development and Production splitting

  pyqt, python, sqlalchemy

I just finished developing and testing an application I have written using PyQT5 and SQLAlchemy. Now I want to run it on several computers and let people in the company I work for use it. The thing is that they will soon start giving me feedback in order to introduce changes. Then I will need to add new buttons, new GUIS, new tables to the database, new fields, alter fields metadata, etc. I read some docs of Alembic, which would allow me to alter the database schema without dropping the entire database. I don’t know how to manage this. Until now, my cycle was:

1 - Add database change (new field to hold invoice ETA, for example), re-build database from 
  scratch
2 - Add GUI and button callbacks, table models, etc
3 - Test if it works.

Now, if the company starts working with the application producing real data, I cannot do the above cycle anymore. For example, if the company wants me to change the font of the generated pdfs, I guess I should touch my version of the application, push it to GitHub, and clone from there on every individual computer and this should work because no code involving database was modified.
If the company wants to add new functionality where new tables need to be created, I guess I should implement it on my version of the project with the above cycle, and when it works, write an alembic script that alters the database schema and results in the new database schema (No previous information losing), run that alembic migration, push to Github the new version of the code and then clone the project into every computer. I don’t know how to manage this. Any reference to docs, tools, books will be appreciated.

Source: Python Questions

LEAVE A COMMENT