university-final-iot-backend/migrations/versions/9f71f5a68c53_.py

36 lines
961 B
Python

"""empty message
Revision ID: 9f71f5a68c53
Revises: 3cf41808886b
Create Date: 2018-11-04 15:00:35.383875
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9f71f5a68c53'
down_revision = '3cf41808886b'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('device_documentations',
sa.Column('device_id', sa.Integer(), nullable=False),
sa.Column('text', sa.Text(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.Column('modified_at', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['device_id'], ['devices.id'], ),
sa.PrimaryKeyConstraint('device_id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('device_documentations')
# ### end Alembic commands ###