init
This commit is contained in:
commit
4be274d9e2
39 changed files with 2548 additions and 0 deletions
31
migrations/versions/20da26039edf_name_the_pet.py
Normal file
31
migrations/versions/20da26039edf_name_the_pet.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"""name the pet
|
||||
|
||||
Revision ID: 20da26039edf
|
||||
Revises: 44fbe5f1a689
|
||||
Create Date: 2023-05-18 11:18:35.748333
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '20da26039edf'
|
||||
down_revision = '44fbe5f1a689'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('hero', 'new_attribute')
|
||||
op.add_column('pet', sa.Column('name', sqlmodel.sql.sqltypes.AutoString(), nullable=False))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('pet', 'name')
|
||||
op.add_column('hero', sa.Column('new_attribute', sa.VARCHAR(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Add table
Add a link
Reference in a new issue