2020-07-09 02:26:01 +02:00
|
|
|
"""empty message
|
|
|
|
|
|
|
|
Revision ID: dd27f1311a90
|
|
|
|
Revises: c141a63b2487
|
|
|
|
Create Date: 2020-07-09 00:20:39.501355
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
2023-05-13 18:53:21 +02:00
|
|
|
from sqlalchemy import text
|
2020-07-09 02:26:01 +02:00
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = 'dd27f1311a90'
|
|
|
|
down_revision = 'c141a63b2487'
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.add_column('package', sa.Column('score_downloads', sa.Float(), nullable=False, server_default="0"))
|
2023-05-13 18:53:21 +02:00
|
|
|
op.execute(text("""
|
2020-07-09 02:26:01 +02:00
|
|
|
UPDATE "package" SET "score_downloads"="score";
|
2023-05-13 18:53:21 +02:00
|
|
|
"""))
|
2020-07-09 02:26:01 +02:00
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.drop_column('package', 'score_downloads')
|
|
|
|
# ### end Alembic commands ###
|