mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-03 20:02:47 +00:00 
			
		
		
		
	Use enums where appropriate. This commit includes new migrations that are NOT compatible with older nopaque instances
This commit is contained in:
		@@ -1 +1 @@
 | 
			
		||||
Generic single-database configuration.
 | 
			
		||||
Single-database configuration for Flask.
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@
 | 
			
		||||
 | 
			
		||||
# Logging configuration
 | 
			
		||||
[loggers]
 | 
			
		||||
keys = root,sqlalchemy,alembic
 | 
			
		||||
keys = root,sqlalchemy,alembic,flask_migrate
 | 
			
		||||
 | 
			
		||||
[handlers]
 | 
			
		||||
keys = console
 | 
			
		||||
@@ -34,6 +34,11 @@ level = INFO
 | 
			
		||||
handlers =
 | 
			
		||||
qualname = alembic
 | 
			
		||||
 | 
			
		||||
[logger_flask_migrate]
 | 
			
		||||
level = INFO
 | 
			
		||||
handlers =
 | 
			
		||||
qualname = flask_migrate
 | 
			
		||||
 | 
			
		||||
[handler_console]
 | 
			
		||||
class = StreamHandler
 | 
			
		||||
args = (sys.stderr,)
 | 
			
		||||
 
 | 
			
		||||
@@ -3,8 +3,7 @@ from __future__ import with_statement
 | 
			
		||||
import logging
 | 
			
		||||
from logging.config import fileConfig
 | 
			
		||||
 | 
			
		||||
from sqlalchemy import engine_from_config
 | 
			
		||||
from sqlalchemy import pool
 | 
			
		||||
from flask import current_app
 | 
			
		||||
 | 
			
		||||
from alembic import context
 | 
			
		||||
 | 
			
		||||
@@ -21,10 +20,10 @@ logger = logging.getLogger('alembic.env')
 | 
			
		||||
# for 'autogenerate' support
 | 
			
		||||
# from myapp import mymodel
 | 
			
		||||
# target_metadata = mymodel.Base.metadata
 | 
			
		||||
from flask import current_app
 | 
			
		||||
config.set_main_option(
 | 
			
		||||
    'sqlalchemy.url', current_app.config.get(
 | 
			
		||||
        'SQLALCHEMY_DATABASE_URI').replace('%', '%%'))
 | 
			
		||||
    'sqlalchemy.url',
 | 
			
		||||
    str(current_app.extensions['migrate'].db.get_engine().url).replace(
 | 
			
		||||
        '%', '%%'))
 | 
			
		||||
target_metadata = current_app.extensions['migrate'].db.metadata
 | 
			
		||||
 | 
			
		||||
# other values from the config, defined by the needs of env.py,
 | 
			
		||||
@@ -72,11 +71,7 @@ def run_migrations_online():
 | 
			
		||||
                directives[:] = []
 | 
			
		||||
                logger.info('No changes in schema detected.')
 | 
			
		||||
 | 
			
		||||
    connectable = engine_from_config(
 | 
			
		||||
        config.get_section(config.config_ini_section),
 | 
			
		||||
        prefix='sqlalchemy.',
 | 
			
		||||
        poolclass=pool.NullPool,
 | 
			
		||||
    )
 | 
			
		||||
    connectable = current_app.extensions['migrate'].db.get_engine()
 | 
			
		||||
 | 
			
		||||
    with connectable.connect() as connection:
 | 
			
		||||
        context.configure(
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: da9fd175af8c
 | 
			
		||||
Revision ID: 097aae1f02d7
 | 
			
		||||
Revises: 
 | 
			
		||||
Create Date: 2019-10-23 08:11:02.741683
 | 
			
		||||
Create Date: 2022-02-08 10:02:03.748588
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
@@ -10,7 +10,7 @@ import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'da9fd175af8c'
 | 
			
		||||
revision = '097aae1f02d7'
 | 
			
		||||
down_revision = None
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
@@ -29,67 +29,108 @@ def upgrade():
 | 
			
		||||
    op.create_index(op.f('ix_roles_default'), 'roles', ['default'], unique=False)
 | 
			
		||||
    op.create_table('users',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('role_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('confirmed', sa.Boolean(), nullable=True),
 | 
			
		||||
    sa.Column('email', sa.String(length=254), nullable=True),
 | 
			
		||||
    sa.Column('last_seen', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('member_since', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('password_hash', sa.String(length=128), nullable=True),
 | 
			
		||||
    sa.Column('registration_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('role_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('token', sa.String(length=32), nullable=True),
 | 
			
		||||
    sa.Column('token_expiration', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('username', sa.String(length=64), nullable=True),
 | 
			
		||||
    sa.Column('is_dark', sa.Boolean(), nullable=True),
 | 
			
		||||
    sa.Column('setting_dark_mode', sa.Boolean(), nullable=True),
 | 
			
		||||
    sa.Column('setting_job_status_mail_notification_level', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['role_id'], ['roles.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    op.create_index(op.f('ix_users_email'), 'users', ['email'], unique=True)
 | 
			
		||||
    op.create_index(op.f('ix_users_token'), 'users', ['token'], unique=True)
 | 
			
		||||
    op.create_index(op.f('ix_users_username'), 'users', ['username'], unique=True)
 | 
			
		||||
    op.create_table('corpora',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('user_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('creation_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('description', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('last_edited_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('status', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('title', sa.String(length=32), nullable=True),
 | 
			
		||||
    sa.Column('user_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('num_analysis_sessions', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('num_tokens', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('archive_file', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    op.create_table('jobs',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('user_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('creation_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('description', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('end_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('mem_mb', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('n_cores', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('service', sa.String(length=64), nullable=True),
 | 
			
		||||
    sa.Column('service_args', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('service_version', sa.String(length=16), nullable=True),
 | 
			
		||||
    sa.Column('status', sa.String(length=16), nullable=True),
 | 
			
		||||
    sa.Column('status', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('title', sa.String(length=32), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    op.create_table('tesseract_ocr_models',
 | 
			
		||||
    sa.Column('creation_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('filename', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('last_edited_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('mimetype', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('user_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('compatible_service_versions', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('description', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('publisher', sa.String(length=128), nullable=True),
 | 
			
		||||
    sa.Column('publishing_year', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('title', sa.String(length=64), nullable=True),
 | 
			
		||||
    sa.Column('version', sa.String(length=16), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    op.create_table('corpus_files',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('creation_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('filename', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('dir', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('last_edited_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('mimetype', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('corpus_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('address', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('author', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('booktitle', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('chapter', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('editor', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('institution', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('journal', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('pages', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('publisher', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('publishing_year', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('school', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('title', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['corpus_id'], ['corpora.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    op.create_table('job_inputs',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('creation_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('filename', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('dir', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('last_edited_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('mimetype', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('job_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    op.create_table('job_results',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('creation_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('filename', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('dir', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('last_edited_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('mimetype', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('job_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('job_input_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('description', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], ),
 | 
			
		||||
    sa.ForeignKeyConstraint(['job_input_id'], ['job_inputs.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -100,9 +141,11 @@ def downgrade():
 | 
			
		||||
    op.drop_table('job_results')
 | 
			
		||||
    op.drop_table('job_inputs')
 | 
			
		||||
    op.drop_table('corpus_files')
 | 
			
		||||
    op.drop_table('tesseract_ocr_models')
 | 
			
		||||
    op.drop_table('jobs')
 | 
			
		||||
    op.drop_table('corpora')
 | 
			
		||||
    op.drop_index(op.f('ix_users_username'), table_name='users')
 | 
			
		||||
    op.drop_index(op.f('ix_users_token'), table_name='users')
 | 
			
		||||
    op.drop_index(op.f('ix_users_email'), table_name='users')
 | 
			
		||||
    op.drop_table('users')
 | 
			
		||||
    op.drop_index(op.f('ix_roles_default'), table_name='roles')
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 099037c4aa06
 | 
			
		||||
Revises: 66253783654f
 | 
			
		||||
Create Date: 2020-04-27 09:17:15.039728
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '099037c4aa06'
 | 
			
		||||
down_revision = '66253783654f'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('users', sa.Column('last_seen', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('users', sa.Column('setting_site_job_status_notifications', sa.String(length=16), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('users', 'setting_site_job_status_notifications')
 | 
			
		||||
    op.drop_column('users', 'last_seen')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 0aa38a7973c5
 | 
			
		||||
Revises: 1210adfe1e34
 | 
			
		||||
Create Date: 2019-11-06 09:33:46.296653
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '0aa38a7973c5'
 | 
			
		||||
down_revision = '1210adfe1e34'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('analysis_ip', sa.String(length=16), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('corpora', 'analysis_ip')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 0d7aed934679
 | 
			
		||||
Revises: b15366b25bea
 | 
			
		||||
Create Date: 2020-06-30 13:57:48.782173
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '0d7aed934679'
 | 
			
		||||
down_revision = 'b15366b25bea'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('result_files', sa.Column('corpus_metadata', sa.JSON(), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('result_files', 'corpus_metadata')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 10a92d8f4616
 | 
			
		||||
Revises: 4638e6509e13
 | 
			
		||||
Create Date: 2020-05-12 11:24:46.022674
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '10a92d8f4616'
 | 
			
		||||
down_revision = '4638e6509e13'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('notifications_data', sa.Column('notified_on', sa.String(length=16), nullable=True))
 | 
			
		||||
    op.drop_column('notifications_data', 'notified')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('notifications_data', sa.Column('notified', sa.BOOLEAN(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.drop_column('notifications_data', 'notified_on')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 1210adfe1e34
 | 
			
		||||
Revises: abf60427ff84
 | 
			
		||||
Create Date: 2019-11-04 12:54:39.389263
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '1210adfe1e34'
 | 
			
		||||
down_revision = 'abf60427ff84'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('status', sa.String(length=16), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('corpora', 'status')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 318074622d14
 | 
			
		||||
Revises: 0d7aed934679
 | 
			
		||||
Create Date: 2020-06-30 14:00:18.968769
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
from sqlalchemy.dialects import postgresql
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '318074622d14'
 | 
			
		||||
down_revision = '0d7aed934679'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('result_files', 'corpus_metadata')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('result_files', sa.Column('corpus_metadata', postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 33ec4d09b4ca
 | 
			
		||||
Revises: 4cf5e5606a83
 | 
			
		||||
Create Date: 2020-07-13 09:07:19.297185
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '33ec4d09b4ca'
 | 
			
		||||
down_revision = '4cf5e5606a83'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('query_results', sa.Column('description', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('query_results', sa.Column('title', sa.String(length=32), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('query_results', 'title')
 | 
			
		||||
    op.drop_column('query_results', 'description')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 389bcf564726
 | 
			
		||||
Revises: 318074622d14
 | 
			
		||||
Create Date: 2020-06-30 14:03:33.384379
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '389bcf564726'
 | 
			
		||||
down_revision = '318074622d14'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('result_files', sa.Column('corpus_metadata', sa.JSON(), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('result_files', 'corpus_metadata')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 3d9a20b8b26c
 | 
			
		||||
Revises: 421ba4373e50
 | 
			
		||||
Create Date: 2020-05-14 09:30:56.266381
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '3d9a20b8b26c'
 | 
			
		||||
down_revision = '421ba4373e50'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('notification_email_data', sa.Column('notify_status', sa.String(length=16), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('notification_email_data', 'notify_status')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 421ba4373e50
 | 
			
		||||
Revises: 5ba6786a847e
 | 
			
		||||
Create Date: 2020-05-14 08:35:47.367125
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '421ba4373e50'
 | 
			
		||||
down_revision = '5ba6786a847e'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.create_table('notification_email_data',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('job_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_table('notification_email_data')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,38 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 4638e6509e13
 | 
			
		||||
Revises: 471aa04c1a92
 | 
			
		||||
Create Date: 2020-05-12 06:42:04.475585
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '4638e6509e13'
 | 
			
		||||
down_revision = '471aa04c1a92'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('notifications_data', sa.Column('notified', sa.Boolean(), nullable=True))
 | 
			
		||||
    op.drop_column('notifications_data', 'notified_on_queued')
 | 
			
		||||
    op.drop_column('notifications_data', 'notified_on_running')
 | 
			
		||||
    op.drop_column('notifications_data', 'notified_on_submitted')
 | 
			
		||||
    op.drop_column('notifications_data', 'notified_on_complete')
 | 
			
		||||
    op.drop_column('notifications_data', 'notified_on_canceling')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('notifications_data', sa.Column('notified_on_canceling', sa.BOOLEAN(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('notifications_data', sa.Column('notified_on_complete', sa.BOOLEAN(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('notifications_data', sa.Column('notified_on_submitted', sa.BOOLEAN(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('notifications_data', sa.Column('notified_on_running', sa.BOOLEAN(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('notifications_data', sa.Column('notified_on_queued', sa.BOOLEAN(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.drop_column('notifications_data', 'notified')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,38 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 471aa04c1a92
 | 
			
		||||
Revises: 62233e0cb2c7
 | 
			
		||||
Create Date: 2020-05-11 14:07:12.934869
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '471aa04c1a92'
 | 
			
		||||
down_revision = '62233e0cb2c7'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.create_table('notifications_data',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('job_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('notified_on_submitted', sa.Boolean(), nullable=True),
 | 
			
		||||
    sa.Column('notified_on_queued', sa.Boolean(), nullable=True),
 | 
			
		||||
    sa.Column('notified_on_running', sa.Boolean(), nullable=True),
 | 
			
		||||
    sa.Column('notified_on_complete', sa.Boolean(), nullable=True),
 | 
			
		||||
    sa.Column('notified_on_canceling', sa.Boolean(), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_table('notifications_data')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 4886241e0f5d
 | 
			
		||||
Revises: 3d9a20b8b26c
 | 
			
		||||
Create Date: 2020-05-14 11:58:08.498454
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '4886241e0f5d'
 | 
			
		||||
down_revision = '3d9a20b8b26c'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('notification_email_data', sa.Column('creation_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('notification_email_data', 'creation_date')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,36 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 49a42c69e523
 | 
			
		||||
Revises: 099037c4aa06
 | 
			
		||||
Create Date: 2020-04-27 11:18:32.999099
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
from sqlalchemy.dialects import postgresql
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '49a42c69e523'
 | 
			
		||||
down_revision = '099037c4aa06'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('users', sa.Column('member_since', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('users', sa.Column('setting_job_status_mail_notifications', sa.String(length=16), nullable=True))
 | 
			
		||||
    op.add_column('users', sa.Column('setting_job_status_site_notifications', sa.String(length=16), nullable=True))
 | 
			
		||||
    op.drop_column('users', 'setting_site_job_status_notifications')
 | 
			
		||||
    op.drop_column('users', 'registration_date')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('users', sa.Column('registration_date', postgresql.TIMESTAMP(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('users', sa.Column('setting_site_job_status_notifications', sa.VARCHAR(length=16), autoincrement=False, nullable=True))
 | 
			
		||||
    op.drop_column('users', 'setting_job_status_site_notifications')
 | 
			
		||||
    op.drop_column('users', 'setting_job_status_mail_notifications')
 | 
			
		||||
    op.drop_column('users', 'member_since')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,35 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 4cf5e5606a83
 | 
			
		||||
Revises: e256f5cac75d
 | 
			
		||||
Create Date: 2020-07-13 08:30:57.369850
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '4cf5e5606a83'
 | 
			
		||||
down_revision = 'e256f5cac75d'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.create_table('query_results',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('user_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('filename', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('query_metadata', sa.JSON(), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_table('query_results')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 55d2b1a82ba9
 | 
			
		||||
Revises: 8b2e0d43384a
 | 
			
		||||
Create Date: 2021-04-14 12:10:08.675542
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '55d2b1a82ba9'
 | 
			
		||||
down_revision = '8b2e0d43384a'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('jobs', 'mem_mb')
 | 
			
		||||
    op.drop_column('jobs', 'n_cores')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('jobs', sa.Column('n_cores', sa.INTEGER(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('jobs', sa.Column('mem_mb', sa.INTEGER(), autoincrement=False, nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 5ba6786a847e
 | 
			
		||||
Revises: 10a92d8f4616
 | 
			
		||||
Create Date: 2020-05-12 13:15:56.265610
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '5ba6786a847e'
 | 
			
		||||
down_revision = '10a92d8f4616'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.create_table('notification_data',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('job_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('notified_on', sa.String(length=16), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    op.drop_table('notifications_data')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.create_table('notifications_data',
 | 
			
		||||
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
 | 
			
		||||
    sa.Column('job_id', sa.INTEGER(), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.Column('notified_on', sa.VARCHAR(length=16), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], name='notifications_data_job_id_fkey'),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id', name='notifications_data_pkey')
 | 
			
		||||
    )
 | 
			
		||||
    op.drop_table('notification_data')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,34 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 62233e0cb2c7
 | 
			
		||||
Revises: 68772b6560c3
 | 
			
		||||
Create Date: 2020-05-04 09:42:25.408403
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '62233e0cb2c7'
 | 
			
		||||
down_revision = '68772b6560c3'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('current_nr_of_tokens', sa.BigInteger(), nullable=True))
 | 
			
		||||
    op.add_column('corpora', sa.Column('max_nr_of_tokens', sa.BigInteger(), nullable=True))
 | 
			
		||||
    op.drop_column('corpora', 'analysis_container_name')
 | 
			
		||||
    op.drop_column('corpora', 'analysis_container_ip')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('analysis_container_ip', sa.VARCHAR(length=16), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('corpora', sa.Column('analysis_container_name', sa.VARCHAR(length=32), autoincrement=False, nullable=True))
 | 
			
		||||
    op.drop_column('corpora', 'max_nr_of_tokens')
 | 
			
		||||
    op.drop_column('corpora', 'current_nr_of_tokens')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 6227310c2112
 | 
			
		||||
Revises: ded5a37f8a7b
 | 
			
		||||
Create Date: 2020-01-30 09:28:06.770159
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '6227310c2112'
 | 
			
		||||
down_revision = 'ded5a37f8a7b'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_constraint('job_results_job_input_id_fkey', 'job_results', type_='foreignkey')
 | 
			
		||||
    op.drop_column('job_results', 'job_input_id')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('job_results', sa.Column('job_input_id', sa.INTEGER(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.create_foreign_key('job_results_job_input_id_fkey', 'job_results', 'job_inputs', ['job_input_id'], ['id'])
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 66253783654f
 | 
			
		||||
Revises: 7378391345fa
 | 
			
		||||
Create Date: 2020-04-27 08:26:19.772088
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '66253783654f'
 | 
			
		||||
down_revision = '7378391345fa'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('users', sa.Column('setting_dark_mode', sa.Boolean(), nullable=True))
 | 
			
		||||
    op.drop_column('users', 'is_dark')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('users', sa.Column('is_dark', sa.BOOLEAN(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.drop_column('users', 'setting_dark_mode')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 68772b6560c3
 | 
			
		||||
Revises: 49a42c69e523
 | 
			
		||||
Create Date: 2020-04-28 07:47:40.495698
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '68772b6560c3'
 | 
			
		||||
down_revision = '49a42c69e523'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('last_edited_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('corpora', 'last_edited_date')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,50 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 68ed092ffe5e
 | 
			
		||||
Revises: be010d5d708d
 | 
			
		||||
Create Date: 2021-11-24 15:33:16.258600
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '68ed092ffe5e'
 | 
			
		||||
down_revision = 'be010d5d708d'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('creation_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('last_edited_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('mimetype', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('job_inputs', sa.Column('creation_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('job_inputs', sa.Column('last_edited_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('job_inputs', sa.Column('mimetype', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('job_results', sa.Column('creation_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('job_results', sa.Column('last_edited_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('job_results', sa.Column('mimetype', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('query_results', sa.Column('creation_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('query_results', sa.Column('last_edited_date', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.add_column('query_results', sa.Column('mimetype', sa.String(length=255), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('query_results', 'mimetype')
 | 
			
		||||
    op.drop_column('query_results', 'last_edited_date')
 | 
			
		||||
    op.drop_column('query_results', 'creation_date')
 | 
			
		||||
    op.drop_column('job_results', 'mimetype')
 | 
			
		||||
    op.drop_column('job_results', 'last_edited_date')
 | 
			
		||||
    op.drop_column('job_results', 'creation_date')
 | 
			
		||||
    op.drop_column('job_inputs', 'mimetype')
 | 
			
		||||
    op.drop_column('job_inputs', 'last_edited_date')
 | 
			
		||||
    op.drop_column('job_inputs', 'creation_date')
 | 
			
		||||
    op.drop_column('corpus_files', 'mimetype')
 | 
			
		||||
    op.drop_column('corpus_files', 'last_edited_date')
 | 
			
		||||
    op.drop_column('corpus_files', 'creation_date')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,59 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 6c2227f1cc77
 | 
			
		||||
Revises: befe5326787e
 | 
			
		||||
Create Date: 2020-12-02 08:50:45.880062
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
from sqlalchemy.dialects import postgresql
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '6c2227f1cc77'
 | 
			
		||||
down_revision = 'befe5326787e'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_table('notification_data')
 | 
			
		||||
    op.drop_table('notification_email_data')
 | 
			
		||||
    op.drop_column('corpus_files', 'dir')
 | 
			
		||||
    op.drop_column('job_inputs', 'dir')
 | 
			
		||||
    op.drop_column('job_results', 'dir')
 | 
			
		||||
    op.drop_column('jobs', 'secure_filename')
 | 
			
		||||
    op.alter_column('roles', 'permissions',
 | 
			
		||||
               existing_type=sa.BIGINT(),
 | 
			
		||||
               type_=sa.Integer(),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.alter_column('roles', 'permissions',
 | 
			
		||||
               existing_type=sa.Integer(),
 | 
			
		||||
               type_=sa.BIGINT(),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    op.add_column('jobs', sa.Column('secure_filename', sa.VARCHAR(length=32), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('job_results', sa.Column('dir', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('job_inputs', sa.Column('dir', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('dir', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
 | 
			
		||||
    op.create_table('notification_email_data',
 | 
			
		||||
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
 | 
			
		||||
    sa.Column('job_id', sa.INTEGER(), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.Column('notify_status', sa.VARCHAR(length=16), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.Column('creation_date', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], name='notification_email_data_job_id_fkey'),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id', name='notification_email_data_pkey')
 | 
			
		||||
    )
 | 
			
		||||
    op.create_table('notification_data',
 | 
			
		||||
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
 | 
			
		||||
    sa.Column('job_id', sa.INTEGER(), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.Column('notified_on', sa.VARCHAR(length=16), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], name='notification_data_job_id_fkey'),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id', name='notification_data_pkey')
 | 
			
		||||
    )
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 7378391345fa
 | 
			
		||||
Revises: 6227310c2112
 | 
			
		||||
Create Date: 2020-02-17 12:29:17.851954
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '7378391345fa'
 | 
			
		||||
down_revision = '6227310c2112'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('jobs', sa.Column('secure_filename', sa.String(length=32), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('jobs', 'secure_filename')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 776761fb7466
 | 
			
		||||
Revises: 0aa38a7973c5
 | 
			
		||||
Create Date: 2019-11-07 08:34:01.676055
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '776761fb7466'
 | 
			
		||||
down_revision = '0aa38a7973c5'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('analysis_container_ip', sa.String(length=16), nullable=True))
 | 
			
		||||
    op.add_column('corpora', sa.Column('analysis_container_name', sa.String(length=32), nullable=True))
 | 
			
		||||
    op.drop_column('corpora', 'analysis_ip')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('analysis_ip', sa.VARCHAR(length=16), autoincrement=False, nullable=True))
 | 
			
		||||
    op.drop_column('corpora', 'analysis_container_name')
 | 
			
		||||
    op.drop_column('corpora', 'analysis_container_ip')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 790ce9512e75
 | 
			
		||||
Revises: 6c2227f1cc77
 | 
			
		||||
Create Date: 2021-01-25 11:13:36.953269
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '790ce9512e75'
 | 
			
		||||
down_revision = '6c2227f1cc77'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.alter_column('corpora', 'current_nr_of_tokens',
 | 
			
		||||
               existing_type=sa.BIGINT(),
 | 
			
		||||
               type_=sa.Integer(),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    op.alter_column('corpora', 'max_nr_of_tokens',
 | 
			
		||||
               existing_type=sa.BIGINT(),
 | 
			
		||||
               type_=sa.Integer(),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.alter_column('corpora', 'max_nr_of_tokens',
 | 
			
		||||
               existing_type=sa.Integer(),
 | 
			
		||||
               type_=sa.BIGINT(),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    op.alter_column('corpora', 'current_nr_of_tokens',
 | 
			
		||||
               existing_type=sa.Integer(),
 | 
			
		||||
               type_=sa.BIGINT(),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 8b2e0d43384a
 | 
			
		||||
Revises: 790ce9512e75
 | 
			
		||||
Create Date: 2021-01-25 11:18:45.256537
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '8b2e0d43384a'
 | 
			
		||||
down_revision = '790ce9512e75'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('corpora', 'max_nr_of_tokens')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('max_nr_of_tokens', sa.INTEGER(), autoincrement=False, nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,50 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: 9d21b228d353
 | 
			
		||||
Revises: 33ec4d09b4ca
 | 
			
		||||
Create Date: 2020-07-15 08:58:59.062442
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = '9d21b228d353'
 | 
			
		||||
down_revision = '33ec4d09b4ca'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.alter_column('corpus_files', 'author',
 | 
			
		||||
               existing_type=sa.VARCHAR(length=64),
 | 
			
		||||
               type_=sa.String(length=255),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    op.alter_column('corpus_files', 'title',
 | 
			
		||||
               existing_type=sa.VARCHAR(length=64),
 | 
			
		||||
               type_=sa.String(length=255),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    op.alter_column('roles', 'permissions',
 | 
			
		||||
               existing_type=sa.INTEGER(),
 | 
			
		||||
               type_=sa.BigInteger(),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.alter_column('roles', 'permissions',
 | 
			
		||||
               existing_type=sa.BigInteger(),
 | 
			
		||||
               type_=sa.INTEGER(),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    op.alter_column('corpus_files', 'title',
 | 
			
		||||
               existing_type=sa.String(length=255),
 | 
			
		||||
               type_=sa.VARCHAR(length=64),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    op.alter_column('corpus_files', 'author',
 | 
			
		||||
               existing_type=sa.String(length=255),
 | 
			
		||||
               type_=sa.VARCHAR(length=64),
 | 
			
		||||
               existing_nullable=True)
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: a4b3cf4ab098
 | 
			
		||||
Revises: c384d7b3268a
 | 
			
		||||
Create Date: 2021-09-23 13:14:16.227784
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'a4b3cf4ab098'
 | 
			
		||||
down_revision = 'c384d7b3268a'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('num_tokens', sa.Integer(), nullable=True))
 | 
			
		||||
    op.drop_column('corpora', 'current_nr_of_tokens')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('current_nr_of_tokens', sa.INTEGER(), autoincrement=False, nullable=True))
 | 
			
		||||
    op.drop_column('corpora', 'num_tokens')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: abf60427ff84
 | 
			
		||||
Revises: da9fd175af8c
 | 
			
		||||
Create Date: 2019-10-28 14:43:39.691313
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'abf60427ff84'
 | 
			
		||||
down_revision = 'da9fd175af8c'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('author', sa.String(length=64), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('publishing_year', sa.Integer(), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('title', sa.String(length=64), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('corpus_files', 'title')
 | 
			
		||||
    op.drop_column('corpus_files', 'publishing_year')
 | 
			
		||||
    op.drop_column('corpus_files', 'author')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,45 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: ad0d835fe5b1
 | 
			
		||||
Revises: 68ed092ffe5e
 | 
			
		||||
Create Date: 2022-01-18 16:23:45.673993
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'ad0d835fe5b1'
 | 
			
		||||
down_revision = '68ed092ffe5e'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.create_table('tesseract_ocr_models',
 | 
			
		||||
    sa.Column('creation_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('filename', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('last_edited_date', sa.DateTime(), nullable=True),
 | 
			
		||||
    sa.Column('mimetype', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('user_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('compatible_service_versions', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('description', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('publisher', sa.String(length=128), nullable=True),
 | 
			
		||||
    sa.Column('publishing_year', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('title', sa.String(length=64), nullable=True),
 | 
			
		||||
    sa.Column('version', sa.String(length=16), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    op.add_column('job_results', sa.Column('description', sa.String(length=255), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('job_results', 'description')
 | 
			
		||||
    op.drop_table('tesseract_ocr_models')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: b15366b25bea
 | 
			
		||||
Revises: 4886241e0f5d
 | 
			
		||||
Create Date: 2020-06-29 13:41:14.394680
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'b15366b25bea'
 | 
			
		||||
down_revision = '4886241e0f5d'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.create_table('results',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('user_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    op.create_table('result_files',
 | 
			
		||||
    sa.Column('id', sa.Integer(), nullable=False),
 | 
			
		||||
    sa.Column('result_id', sa.Integer(), nullable=True),
 | 
			
		||||
    sa.Column('filename', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.Column('dir', sa.String(length=255), nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['result_id'], ['results.id'], ),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id')
 | 
			
		||||
    )
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_table('result_files')
 | 
			
		||||
    op.drop_table('results')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: be010d5d708d
 | 
			
		||||
Revises: a4b3cf4ab098
 | 
			
		||||
Create Date: 2021-09-24 09:34:54.173653
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'be010d5d708d'
 | 
			
		||||
down_revision = 'a4b3cf4ab098'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('num_analysis_sessions', sa.Integer(), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('corpora', 'num_analysis_sessions')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: befe5326787e
 | 
			
		||||
Revises: ecaf75fece7b
 | 
			
		||||
Create Date: 2020-10-16 13:32:09.620960
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'befe5326787e'
 | 
			
		||||
down_revision = 'ecaf75fece7b'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('archive_file', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.drop_column('corpora', 'archive_dir')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('archive_dir', sa.VARCHAR(length=255), autoincrement=False, nullable=True))
 | 
			
		||||
    op.drop_column('corpora', 'archive_file')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,43 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: c3827cddea6e
 | 
			
		||||
Revises: 9d21b228d353
 | 
			
		||||
Create Date: 2020-07-15 12:33:24.574579
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
from sqlalchemy.dialects import postgresql
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'c3827cddea6e'
 | 
			
		||||
down_revision = '9d21b228d353'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_table('result_files')
 | 
			
		||||
    op.drop_table('results')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.create_table('result_files',
 | 
			
		||||
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
 | 
			
		||||
    sa.Column('result_id', sa.INTEGER(), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.Column('filename', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.Column('dir', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['result_id'], ['results.id'], name='result_files_result_id_fkey'),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id', name='result_files_pkey')
 | 
			
		||||
    )
 | 
			
		||||
    op.create_table('results',
 | 
			
		||||
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
 | 
			
		||||
    sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.Column('corpus_metadata', postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=True),
 | 
			
		||||
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], name='results_user_id_fkey'),
 | 
			
		||||
    sa.PrimaryKeyConstraint('id', name='results_pkey')
 | 
			
		||||
    )
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: c384d7b3268a
 | 
			
		||||
Revises: 55d2b1a82ba9
 | 
			
		||||
Create Date: 2021-09-14 09:11:45.409350
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'c384d7b3268a'
 | 
			
		||||
down_revision = '55d2b1a82ba9'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('users', sa.Column('token', sa.String(length=32), nullable=True))
 | 
			
		||||
    op.add_column('users', sa.Column('token_expiration', sa.DateTime(), nullable=True))
 | 
			
		||||
    op.create_index(op.f('ix_users_token'), 'users', ['token'], unique=True)
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_index(op.f('ix_users_token'), table_name='users')
 | 
			
		||||
    op.drop_column('users', 'token_expiration')
 | 
			
		||||
    op.drop_column('users', 'token')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,44 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: ded5a37f8a7b
 | 
			
		||||
Revises: 776761fb7466
 | 
			
		||||
Create Date: 2020-01-08 14:39:32.182439
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'ded5a37f8a7b'
 | 
			
		||||
down_revision = '776761fb7466'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('address', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('booktitle', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('chapter', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('editor', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('institution', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('journal', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('pages', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('publisher', sa.String(length=255), nullable=True))
 | 
			
		||||
    op.add_column('corpus_files', sa.Column('school', sa.String(length=255), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('corpus_files', 'school')
 | 
			
		||||
    op.drop_column('corpus_files', 'publisher')
 | 
			
		||||
    op.drop_column('corpus_files', 'pages')
 | 
			
		||||
    op.drop_column('corpus_files', 'journal')
 | 
			
		||||
    op.drop_column('corpus_files', 'institution')
 | 
			
		||||
    op.drop_column('corpus_files', 'editor')
 | 
			
		||||
    op.drop_column('corpus_files', 'chapter')
 | 
			
		||||
    op.drop_column('corpus_files', 'booktitle')
 | 
			
		||||
    op.drop_column('corpus_files', 'address')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,30 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: e256f5cac75d
 | 
			
		||||
Revises: 389bcf564726
 | 
			
		||||
Create Date: 2020-07-01 07:45:24.637861
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
from sqlalchemy.dialects import postgresql
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'e256f5cac75d'
 | 
			
		||||
down_revision = '389bcf564726'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('result_files', 'corpus_metadata')
 | 
			
		||||
    op.add_column('results', sa.Column('corpus_metadata', sa.JSON(), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('results', 'corpus_metadata')
 | 
			
		||||
    op.add_column('result_files', sa.Column('corpus_metadata', postgresql.JSON(astext_type=sa.Text()), autoincrement=False, nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
@@ -1,28 +0,0 @@
 | 
			
		||||
"""empty message
 | 
			
		||||
 | 
			
		||||
Revision ID: ecaf75fece7b
 | 
			
		||||
Revises: c3827cddea6e
 | 
			
		||||
Create Date: 2020-10-16 13:31:30.681269
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
from alembic import op
 | 
			
		||||
import sqlalchemy as sa
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# revision identifiers, used by Alembic.
 | 
			
		||||
revision = 'ecaf75fece7b'
 | 
			
		||||
down_revision = 'c3827cddea6e'
 | 
			
		||||
branch_labels = None
 | 
			
		||||
depends_on = None
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def upgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.add_column('corpora', sa.Column('archive_dir', sa.String(length=255), nullable=True))
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def downgrade():
 | 
			
		||||
    # ### commands auto generated by Alembic - please adjust! ###
 | 
			
		||||
    op.drop_column('corpora', 'archive_dir')
 | 
			
		||||
    # ### end Alembic commands ###
 | 
			
		||||
		Reference in New Issue
	
	Block a user