mirror of
https://github.com/logos-co/open-law.git
synced 2025-01-24 21:59:00 +00:00
migrations
This commit is contained in:
parent
2a0a7958cc
commit
c309f3243f
@ -1,32 +0,0 @@
|
||||
"""book.about
|
||||
|
||||
Revision ID: 254acdcfcc97
|
||||
Revises: 02f6f2ebad1b
|
||||
Create Date: 2023-04-24 12:45:18.363151
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '254acdcfcc97'
|
||||
down_revision = '02f6f2ebad1b'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('books', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('about', sa.Text(), nullable=True))
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
with op.batch_alter_table('books', schema=None) as batch_op:
|
||||
batch_op.drop_column('about')
|
||||
|
||||
# ### end Alembic commands ###
|
@ -1,8 +1,8 @@
|
||||
"""empty message
|
||||
"""init
|
||||
|
||||
Revision ID: 02f6f2ebad1b
|
||||
Revision ID: e96f96cb7d02
|
||||
Revises:
|
||||
Create Date: 2023-04-21 17:26:06.003994
|
||||
Create Date: 2023-04-26 11:40:49.008918
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
@ -10,7 +10,7 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '02f6f2ebad1b'
|
||||
revision = 'e96f96cb7d02'
|
||||
down_revision = None
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
@ -37,6 +37,7 @@ def upgrade():
|
||||
)
|
||||
op.create_table('books',
|
||||
sa.Column('label', sa.String(length=1024), nullable=False),
|
||||
sa.Column('about', sa.Text(), nullable=True),
|
||||
sa.Column('user_id', sa.Integer(), nullable=True),
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True),
|
Loading…
x
Reference in New Issue
Block a user