mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
45 lines
1.5 KiB
Python
45 lines
1.5 KiB
Python
"""empty message
|
|
|
|
Revision ID: 7afc40e11791
|
|
Revises: a8c662c46047
|
|
Create Date: 2020-09-28 10:38:46.424791
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
import sqlalchemy_utils
|
|
from project import dbtypes
|
|
from project.models import FeaturedEventRejectionReason, FeaturedEventReviewStatus
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '7afc40e11791'
|
|
down_revision = 'a8c662c46047'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('featuredevent',
|
|
sa.Column('created_at', sa.DateTime(), nullable=True),
|
|
sa.Column('id', sa.Integer(), nullable=False),
|
|
sa.Column('event_id', sa.Integer(), nullable=False),
|
|
sa.Column('review_status', dbtypes.IntegerEnum(FeaturedEventReviewStatus), nullable=True),
|
|
sa.Column('rejection_resaon', dbtypes.IntegerEnum(FeaturedEventRejectionReason), nullable=True),
|
|
sa.Column('rating', sa.Integer(), nullable=True),
|
|
sa.Column('created_by_id', sa.Integer(), nullable=True),
|
|
sa.ForeignKeyConstraint(['created_by_id'], ['user.id'], ),
|
|
sa.ForeignKeyConstraint(['event_id'], ['event.id'], ),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
op.add_column('event', sa.Column('rating', sa.Integer(), nullable=True))
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column('event', 'rating')
|
|
op.drop_table('featuredevent')
|
|
# ### end Alembic commands ###
|