app-MAIL-temp/migrations/versions/2021_072818_20c738810b1b_.py

38 lines
1.2 KiB
Python

"""empty message
Revision ID: 20c738810b1b
Revises: 5662122eac21
Create Date: 2021-07-28 18:19:59.477042
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '20c738810b1b'
down_revision = '5662122eac21'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('metric')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('metric',
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
sa.Column('created_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
sa.Column('updated_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
sa.Column('date', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
sa.Column('name', sa.VARCHAR(length=256), autoincrement=False, nullable=False),
sa.Column('value', postgresql.DOUBLE_PRECISION(precision=53), autoincrement=False, nullable=False),
sa.PrimaryKeyConstraint('id', name='metric_pkey')
)
# ### end Alembic commands ###