cafca / souma

Souma is a distributed and end-to-end encrypted community platform based on humanist ideals
Apache License 2.0
5 stars 3 forks source link

Auto-update #173

Closed cafca closed 9 years ago

cafca commented 10 years ago

Auto-update using Esky wrapper around py2app, py2exe.

Changes:

cafca commented 10 years ago

@cartisan I merged the Alembic branch here and created a stub at nucleus.database.initialize_database. Can you make it work? :monkey_face:

cartisan commented 10 years ago

Is noted ( #191 ), right now the study report + semantics is kind off getting at me. Can you provide some more detail? Make Esky update work with alembic migrations? A quick google revealed exactly 0 relevant results. Oo

cafca commented 10 years ago

Haha :D Yes, that was a vague description.

The updater automatically replaces the application directory with an updated version. When this happens, the database might be in an outdated state. Hence, during each startup we let Alembic update the database to the most recent revision.

If Souma is run from the command line we update with python manager.py db upgrade head. In the packaged state however, we want to use Alembic's Python API for this. I created a method stub for this at nucleus.database.initialize_database with a description of what that method should do.

cafca commented 10 years ago

We probably want to use the upgrade method in Flask-Migrate for this, as that is also what gets called from manager.py.

cafca commented 10 years ago

@cartisan I spent hours trying to find out why this crashes Souma without a line of error log when it's packaged and works perfectly when it's not. Then I tried it in Windows and got some very detailed and legible error messages. arghxl. Done for today.

cafca commented 9 years ago

Removed automatic database updates again because of problems to get it to work in frozen state. Updates to the application code should work now.