portal-oddajanje-solar/migrations/versions/a846faa2b908_initial_migration.py

41 lines
1.2 KiB
Python
Raw Normal View History

"""Initial migration.
Revision ID: a846faa2b908
Revises:
Create Date: 2021-03-24 08:53:24.792682
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a846faa2b908'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('upload_regular',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('upload_hash', sa.String(), nullable=False),
sa.Column('timestamp', sa.DateTime(), nullable=False),
sa.Column('name', sa.String(), nullable=False),
sa.Column('org', sa.String(), nullable=True),
sa.Column('address', sa.String(), nullable=True),
sa.Column('zipcode', sa.String(), nullable=True),
sa.Column('email', sa.String(), nullable=False),
sa.Column('file_contract', sa.String(), nullable=True),
sa.Column('upload_file_hashes', sa.ARRAY(sa.String()), nullable=True),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('upload_regular')
# ### end Alembic commands ###