|
|
@ -1,8 +1,8 @@
|
|
|
|
"""empty message
|
|
|
|
"""empty message
|
|
|
|
|
|
|
|
|
|
|
|
Revision ID: e671b32307e0
|
|
|
|
Revision ID: f4e1b4727000
|
|
|
|
Revises:
|
|
|
|
Revises:
|
|
|
|
Create Date: 2020-02-24 23:58:13.446588
|
|
|
|
Create Date: 2020-03-09 12:32:25.827118
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
from alembic import op
|
|
|
@ -11,7 +11,7 @@ import sqlalchemy_utc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = 'e671b32307e0'
|
|
|
|
revision = 'f4e1b4727000'
|
|
|
|
down_revision = None
|
|
|
|
down_revision = None
|
|
|
|
branch_labels = None
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
depends_on = None
|
|
|
@ -20,17 +20,17 @@ depends_on = None
|
|
|
|
def upgrade():
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.create_table('tag',
|
|
|
|
op.create_table('tag',
|
|
|
|
sa.Column('created', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), nullable=False),
|
|
|
|
sa.Column('created', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
|
|
|
|
sa.Column('updated', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), nullable=False),
|
|
|
|
sa.Column('updated', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('content', sa.String(length=128), nullable=False),
|
|
|
|
sa.Column('content', sa.String(length=128), nullable=False),
|
|
|
|
sa.Column('category', sa.Enum('general', 'style', 'circle', 'artist', 'character', 'copyright', name='tag_category'), nullable=True),
|
|
|
|
sa.Column('category', sa.Enum('general', 'style', 'circle', 'artist', 'character', 'copyright', name='tag_category'), nullable=False),
|
|
|
|
sa.PrimaryKeyConstraint('id'),
|
|
|
|
sa.PrimaryKeyConstraint('id'),
|
|
|
|
sa.UniqueConstraint('content')
|
|
|
|
sa.UniqueConstraint('content')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
op.create_table('user',
|
|
|
|
op.create_table('user',
|
|
|
|
sa.Column('created', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), nullable=False),
|
|
|
|
sa.Column('created', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
|
|
|
|
sa.Column('updated', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), nullable=False),
|
|
|
|
sa.Column('updated', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('username', sa.String(length=128), nullable=False),
|
|
|
|
sa.Column('username', sa.String(length=128), nullable=False),
|
|
|
|
sa.Column('email', sa.String(length=256), nullable=True),
|
|
|
|
sa.Column('email', sa.String(length=256), nullable=True),
|
|
|
@ -43,8 +43,8 @@ def upgrade():
|
|
|
|
sa.UniqueConstraint('username')
|
|
|
|
sa.UniqueConstraint('username')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
op.create_table('post',
|
|
|
|
op.create_table('post',
|
|
|
|
sa.Column('created', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), nullable=False),
|
|
|
|
sa.Column('created', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
|
|
|
|
sa.Column('updated', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), nullable=False),
|
|
|
|
sa.Column('updated', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('md5', sa.String(length=32), nullable=False),
|
|
|
|
sa.Column('md5', sa.String(length=32), nullable=False),
|
|
|
|
sa.Column('filetype', sa.Enum('png', 'jpeg', name='filetype'), nullable=False),
|
|
|
|
sa.Column('filetype', sa.Enum('png', 'jpeg', name='filetype'), nullable=False),
|
|
|
@ -63,8 +63,8 @@ def upgrade():
|
|
|
|
sa.UniqueConstraint('md5')
|
|
|
|
sa.UniqueConstraint('md5')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
op.create_table('comment',
|
|
|
|
op.create_table('comment',
|
|
|
|
sa.Column('created', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), nullable=False),
|
|
|
|
sa.Column('created', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
|
|
|
|
sa.Column('updated', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), nullable=False),
|
|
|
|
sa.Column('updated', sqlalchemy_utc.sqltypes.UtcDateTime(timezone=True), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=False),
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
|
|
sa.Column('content', sa.String(length=512), nullable=False),
|
|
|
|
sa.Column('content', sa.String(length=512), nullable=False),
|
|
|
|
sa.Column('deleted', sa.Boolean(), nullable=True),
|
|
|
|
sa.Column('deleted', sa.Boolean(), nullable=True),
|