ref: 98796226802a26b82c888365ad5b9cd331006792 fanboi2/fanboi2/models/_base.py -rw-r--r-- 1.5 KiB
Index naming convention and schema housekeeping.

This commit breaks ability to migrate from existing application to newer
version due to a change in migration ID format. It is highly recommend
to dump the database with data only and restore it to a database, e.g.

    $ pg_dump -T alembic_version -a -Fc > fanboi2.dump
    $ psql template1 -c "DROP DATABASE fanboi2;"
    $ psql template1 -c "CREATE DATABASE fanboi2;"
    $ alembic upgrade c71cae24d111
    $ pg_restore -O -x -a -d fanboi2 fanboi2.dump
    $ alembic upgrade head
Remove column definition in BaseModel.

In order to make everything more explicit and to allow primary key for
the model to be customized, e.g. in case of one-to-one relationship.
Add versioned implementation based on SQLAlchemy's History Meta.
Split model implementation into multiple files.