bundles/mautrix-telegram: fix database migration
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-11-09 12:09:17 +01:00
parent 614b920890
commit c0986eb956
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 2 additions and 11 deletions

View file

@ -2,7 +2,7 @@
[alembic] [alembic]
# path to migration scripts # path to migration scripts
script_location = /opt/mautrix-telegram/alembic script_location = /opt/mautrix-telegram/src/alembic
# template used to generate migration files # template used to generate migration files
# file_template = %%(rev)s_%%(slug)s # file_template = %%(rev)s_%%(slug)s

View file

@ -6,14 +6,6 @@ actions = {
'directory:/opt/mautrix-telegram', # provided by bundle:users 'directory:/opt/mautrix-telegram', # provided by bundle:users
}, },
}, },
'mautrix-telegram_init_alembic': {
'command': '/opt/mautrix-telegram/venv/bin/alembic -c /opt/mautrix-telegram/alembic.ini -x /opt/mautrix-telegram/config.yaml init /opt/mautrix-telegram/alembic',
'unless': 'test -d /opt/mautrix-telegram/alembic',
'needs': {
'action:mautrix-telegram_create_virtualenv',
'file:/opt/mautrix-telegram/alembic.ini',
},
},
'mautrix-telegram_install_bridge': { 'mautrix-telegram_install_bridge': {
'command': 'cd /opt/mautrix-telegram/src && /opt/mautrix-telegram/venv/bin/pip install --upgrade .[all]', 'command': 'cd /opt/mautrix-telegram/src && /opt/mautrix-telegram/venv/bin/pip install --upgrade .[all]',
'needs': { 'needs': {
@ -24,8 +16,7 @@ actions = {
'mautrix-telegram_upgrade_database': { 'mautrix-telegram_upgrade_database': {
'command': '/opt/mautrix-telegram/venv/bin/alembic -c /opt/mautrix-telegram/alembic.ini -x config=/opt/mautrix-telegram/config.yaml upgrade head', 'command': '/opt/mautrix-telegram/venv/bin/alembic -c /opt/mautrix-telegram/alembic.ini -x config=/opt/mautrix-telegram/config.yaml upgrade head',
'needs': { 'needs': {
'action:mautrix-telegram_create_virtualenv', 'action:mautrix-telegram_install_bridge',
'action:mautrix-telegram_init_alembic',
'postgres_db:mautrix-telegram', 'postgres_db:mautrix-telegram',
'postgres_role:mautrix-telegram', 'postgres_role:mautrix-telegram',
}, },