diff options
| author | rr- | 2017-02-04 01:08:12 +0100 |
|---|---|---|
| committer | rr- | 2017-02-05 16:34:45 +0100 |
| commit | ad842ee8a54c57463b8e28b52970f173ea1d64ea (patch) | |
| tree | 1238e8270878801a2ddb10bc4db469115c026cab /server/szurubooru/migrations | |
| parent | abf1fc2b2d135299fe7e8a700d4e7a18966d7bfe (diff) | |
server: refactor + add type hinting
- Added type hinting (for now, 3.5-compatible)
- Split `db` namespace into `db` module and `model` namespace
- Changed elastic search to be created lazily for each operation
- Changed to class based approach in entity serialization to allow
stronger typing
- Removed `required` argument from `context.get_*` family of functions;
now it's implied if `default` argument is omitted
- Changed `unalias_dict` implementation to use less magic inputs
Diffstat (limited to 'server/szurubooru/migrations')
| -rw-r--r-- | server/szurubooru/migrations/env.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/szurubooru/migrations/env.py b/server/szurubooru/migrations/env.py index 1359ab8..a4257d4 100644 --- a/server/szurubooru/migrations/env.py +++ b/server/szurubooru/migrations/env.py @@ -2,7 +2,7 @@ import os import sys import alembic -import sqlalchemy +import sqlalchemy as sa import logging.config # make szurubooru module importable @@ -48,7 +48,7 @@ def run_migrations_online(): In this scenario we need to create an Engine and associate a connection with the context. ''' - connectable = sqlalchemy.engine_from_config( + connectable = sa.engine_from_config( alembic_config.get_section(alembic_config.config_ini_section), prefix='sqlalchemy.', poolclass=sqlalchemy.pool.NullPool) |