Skip to content

Commit

Permalink
[Fixes] Alembic migration errors
Browse files Browse the repository at this point in the history
  • Loading branch information
[esekyi] committed Sep 14, 2024
1 parent f5daeed commit c72cbbd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 220 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"""Added Subscribe model
Revision ID: f6f0a537719a
Revises: 86043ab96515
Create Date: 2024-09-11 14:36:40.996536
Revision ID: 0f04b467b1a7
Revises:
Create Date: 2024-09-14 05:11:39.635188
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'f6f0a537719a'
down_revision = '86043ab96515'
revision = '0f04b467b1a7'
down_revision = None
branch_labels = None
depends_on = None

Expand All @@ -26,10 +26,16 @@ def upgrade():
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email')
)
with op.batch_alter_table('recipe', schema=None) as batch_op:
batch_op.add_column(sa.Column('view_count', sa.Integer(), nullable=True))

# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('recipe', schema=None) as batch_op:
batch_op.drop_column('view_count')

op.drop_table('subscriber')
# ### end Alembic commands ###

This file was deleted.

35 changes: 0 additions & 35 deletions migrations/versions/5246baafeb00_added_subscribe_model.py

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions migrations/versions/86043ab96515_add_view_count_to_recipe.py

This file was deleted.

0 comments on commit c72cbbd

Please sign in to comment.