Skip to content
Snippets Groups Projects
Commit acca781b authored by Syrine Neifar's avatar Syrine Neifar
Browse files

Add database migration for hedgedoc app

parent 7e270df6
No related branches found
No related tags found
1 merge request!80Resolve "Add Hedgedoc"
Pipeline #35845 passed with stages
in 4 minutes and 37 seconds
"""empty message
Revision ID: aee25ad6b0ae
Revises: fc0892d07771
Create Date: 2022-12-15 14:37:55.659132
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'aee25ad6b0ae'
down_revision = 'fc0892d07771'
branch_labels = None
depends_on = None
def upgrade():
# Add hedgedoc app
op.execute(f'INSERT IGNORE INTO app (`id`, `name`, `slug`) VALUES (8,"Hedgedoc","hedgedoc")')
op.execute(f'INSERT IGNORE INTO oauthclient_app (`oauthclient_id`, `app_id`) VALUES ("hedgedoc", 8)')
def downgrade():
op.execute(f'DELETE FROM app WHERE id=8')
op.execute(f'DELETE FROM oauthclient_app WHERE app_id=8')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment