2024-07-29 11:43:52 +08:00

38 lines
1.1 KiB
Python

"""empty message
Revision ID: 688e06991331
Revises: fa9fad0a40c3
Create Date: 2023-04-07 21:02:53.426656
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '688e06991331'
down_revision = 'fa9fad0a40c3'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('img_attrs')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('img_attrs',
sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False),
sa.Column('name', mysql.VARCHAR(length=128), nullable=True),
sa.Column('path', mysql.VARCHAR(length=128), nullable=True),
sa.Column('post_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True),
sa.ForeignKeyConstraint(['post_id'], ['posts.id'], name='img_attrs_ibfk_1'),
sa.PrimaryKeyConstraint('id'),
mysql_default_charset='utf8',
mysql_engine='InnoDB'
)
# ### end Alembic commands ###