Skip to content

Commit

Permalink
Remove function after update
Browse files Browse the repository at this point in the history
  • Loading branch information
schedutron committed May 27, 2018
1 parent cc57ac2 commit 2525021
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions migrations/versions/194a5a2a44ef_.py
Expand Up @@ -42,11 +42,9 @@ def __init__(self, name, sqltext):


def upgrade():
feedbacks_table = sa.sql.table('feedback',
sa.Column('rating', sa.VARCHAR())
)
op.create_or_replace_sp(update_rating_func)
op.execute("""UPDATE feedback SET rating=update_rating(rating)""")
op.execute("UPDATE feedback SET rating=update_rating(rating)")
op.execute("DROP FUNCTION update_rating(text)")

op.alter_column('feedback', 'rating',
existing_type=sa.VARCHAR(),
Expand Down

0 comments on commit 2525021

Please sign in to comment.