You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.8 KiB
59 lines
2.8 KiB
"""Dropped out predavanje stuff, added contract initial file name.
|
|
|
|
Revision ID: ff356b1ef661
|
|
Revises: 5ba116fc7f06
|
|
Create Date: 2021-08-26 12:45:56.036966
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'ff356b1ef661'
|
|
down_revision = '5ba116fc7f06'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('stamps_solar')
|
|
op.drop_table('upload_predavanja')
|
|
op.add_column('contracts_solar', sa.Column('original_filename', sa.String(), nullable=True))
|
|
op.add_column('institution_contract', sa.Column('original_filename', sa.String(), nullable=True))
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column('institution_contract', 'original_filename')
|
|
op.drop_column('contracts_solar', 'original_filename')
|
|
op.create_table('upload_predavanja',
|
|
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
|
sa.Column('upload_hash', sa.VARCHAR(), autoincrement=False, nullable=False),
|
|
sa.Column('timestamp', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
|
|
sa.Column('name', sa.VARCHAR(), autoincrement=False, nullable=False),
|
|
sa.Column('address', sa.VARCHAR(), autoincrement=False, nullable=False),
|
|
sa.Column('subject', sa.VARCHAR(), autoincrement=False, nullable=False),
|
|
sa.Column('faculty', sa.VARCHAR(), autoincrement=False, nullable=False),
|
|
sa.Column('email', sa.VARCHAR(), autoincrement=False, nullable=False),
|
|
sa.Column('phone', sa.VARCHAR(), autoincrement=False, nullable=True),
|
|
sa.Column('keywords', sa.VARCHAR(), autoincrement=False, nullable=False),
|
|
sa.Column('file_contract', sa.VARCHAR(), autoincrement=False, nullable=True),
|
|
sa.Column('upload_file_hashes', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True),
|
|
sa.Column('agree_publish_future', sa.TEXT(), autoincrement=False, nullable=False),
|
|
sa.Column('agree_machine_translation', sa.BOOLEAN(), autoincrement=False, nullable=False),
|
|
sa.Column('agree_news_cjvt', sa.BOOLEAN(), autoincrement=False, nullable=False),
|
|
sa.PrimaryKeyConstraint('id', name='upload_predavanja_pkey')
|
|
)
|
|
op.create_table('stamps_solar',
|
|
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
|
|
sa.Column('institution', sa.INTEGER(), autoincrement=False, nullable=True),
|
|
sa.Column('name', sa.TEXT(), autoincrement=False, nullable=False),
|
|
sa.Column('file_logo', sa.TEXT(), autoincrement=False, nullable=True),
|
|
sa.ForeignKeyConstraint(['institution'], ['institution.id'], name='stamps_institution_fkey'),
|
|
sa.PrimaryKeyConstraint('id', name='stamps_pkey')
|
|
)
|
|
# ### end Alembic commands ###
|