portal-oddajanje-solar/migrations/versions/44dae32b13af_removed_non_solar_stuff.py
2021-10-12 11:11:37 +02:00

42 lines
1.6 KiB
Python

"""Removed non-solar stuff.
Revision ID: 44dae32b13af
Revises: 84168f439c55
Create Date: 2021-10-05 13:22:23.539298
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '44dae32b13af'
down_revision = '84168f439c55'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('upload_regular')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('upload_regular',
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('org', sa.VARCHAR(), autoincrement=False, nullable=True),
sa.Column('address', sa.VARCHAR(), autoincrement=False, nullable=True),
sa.Column('zipcode', sa.VARCHAR(), autoincrement=False, nullable=True),
sa.Column('email', 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('corpus_name', sa.TEXT(), autoincrement=False, nullable=False),
sa.PrimaryKeyConstraint('id', name='upload_regular_pkey')
)
# ### end Alembic commands ###