2022-01-17 02:24:47 +00:00
|
|
|
"""reports
|
2022-01-16 18:22:00 +00:00
|
|
|
|
2022-01-17 02:24:47 +00:00
|
|
|
Revision ID: aee4c6c24811
|
2022-01-16 18:22:00 +00:00
|
|
|
Revises: 8a2966b9f7ee
|
2022-01-17 02:24:47 +00:00
|
|
|
Create Date: 2022-01-16 20:12:39.816567
|
2022-01-16 18:22:00 +00:00
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
2022-01-17 00:49:28 +00:00
|
|
|
|
2022-01-16 18:22:00 +00:00
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
2022-01-17 02:24:47 +00:00
|
|
|
revision = 'aee4c6c24811'
|
2022-01-16 18:22:00 +00:00
|
|
|
down_revision = '8a2966b9f7ee'
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2022-01-17 02:24:47 +00:00
|
|
|
op.create_table('reports',
|
2022-01-17 00:49:28 +00:00
|
|
|
sa.Column('data', sa.JSON(), nullable=False),
|
2022-01-17 02:24:47 +00:00
|
|
|
sa.Column('report_type', sa.VARCHAR(length=35), autoincrement=False, nullable=False),
|
2022-01-17 00:49:28 +00:00
|
|
|
sa.Column('date', sa.Date(), autoincrement=False, nullable=False),
|
2022-01-17 02:24:47 +00:00
|
|
|
sa.PrimaryKeyConstraint('report_type', 'date')
|
2022-01-16 18:22:00 +00:00
|
|
|
)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2022-01-17 02:24:47 +00:00
|
|
|
op.drop_table('reports')
|
2022-01-16 18:22:00 +00:00
|
|
|
# ### end Alembic commands ###
|