<reponame>WeebDataHoarder/stewdio-api<filename>alembic_scripts/versions/45330e860116_.py
"""empty message

Revision ID: 45330e860116
Revises: <PASSWORD>
Create Date: 2017-10-07 18:40:55.568037

"""

# revision identifiers, used by Alembic.
revision = '45330e860116'
down_revision = 'd<PASSWORD>'

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('songs', 'added',
               existing_type=postgresql.TIMESTAMP(),
               nullable=True,
               existing_server_default=sa.text('now()'))
    op.create_unique_constraint(None, 'songs', ['hash'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'songs', type_='unique')
    op.alter_column('songs', 'added',
               existing_type=postgresql.TIMESTAMP(),
               nullable=False,
               existing_server_default=sa.text('now()'))
    # ### end Alembic commands ###

"""empty message

Revision ID: 45330e860116
Revises: <PASSWORD>
Create Date: 2017-10-07 18:40:55.568037

"""

# revision identifiers, used by Alembic.
revision = '45330e860116'
down_revision = 'd<PASSWORD>'

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql

def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('songs', 'added',
               existing_type=postgresql.TIMESTAMP(),
               nullable=True,
               existing_server_default=sa.text('now()'))
    op.create_unique_constraint(None, 'songs', ['hash'])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'songs', type_='unique')
    op.alter_column('songs', 'added',
               existing_type=postgresql.TIMESTAMP(),
               nullable=False,
               existing_server_default=sa.text('now()'))
    # ### end Alembic commands ###
empty message  Revision ID: 45330e860116 Revises: <PASSWORD> Create Date: 2017-10-07 18:40:55.568037 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###