final test before release v1.0
This commit is contained in:
26
cao_blogr/alembic/versions/20230121_a632e375e7dc.py
Normal file
26
cao_blogr/alembic/versions/20230121_a632e375e7dc.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""init
|
||||
|
||||
Revision ID: a632e375e7dc
|
||||
Revises:
|
||||
Create Date: 2023-01-21 11:25:48.517435
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'a632e375e7dc'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('entries', 'author')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('entries', sa.Column('author', sa.VARCHAR(length=50), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
@@ -1,55 +0,0 @@
|
||||
"""init
|
||||
|
||||
Revision ID: d335bb2cb9da
|
||||
Revises:
|
||||
Create Date: 2023-01-21 08:05:36.719719
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'd335bb2cb9da'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table('tags',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('tag', sa.Unicode(length=25), nullable=True),
|
||||
sa.Column('tag_name', sa.Unicode(length=25), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_tags'))
|
||||
)
|
||||
op.create_table('users',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('name', sa.Unicode(length=255), nullable=False),
|
||||
sa.Column('password', sa.Unicode(length=255), nullable=False),
|
||||
sa.Column('last_logged', sa.DateTime(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_users')),
|
||||
sa.UniqueConstraint('name', name=op.f('uq_users_name'))
|
||||
)
|
||||
op.create_table('entries',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('title', sa.Unicode(length=255), nullable=False),
|
||||
sa.Column('body', sa.UnicodeText(), nullable=True),
|
||||
sa.Column('created', sa.DateTime(), nullable=True),
|
||||
sa.Column('creator', sa.Unicode(length=50), nullable=True),
|
||||
sa.Column('edited', sa.DateTime(), nullable=True),
|
||||
sa.Column('editor', sa.Unicode(length=50), nullable=True),
|
||||
sa.Column('tag', sa.Unicode(length=25), nullable=True),
|
||||
sa.Column('author', sa.Unicode(length=50), nullable=True),
|
||||
sa.Column('status', sa.Unicode(length=50), nullable=True),
|
||||
sa.PrimaryKeyConstraint('id', name=op.f('pk_entries')),
|
||||
sa.UniqueConstraint('title', name=op.f('uq_entries_title'))
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table('entries')
|
||||
op.drop_table('users')
|
||||
op.drop_table('tags')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user