"""empty message

Revision ID: 4<PASSWORD>b
Revises: 
Create Date: 2022-03-19 11:56:05.576913

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '4bad<PASSWORD>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('airplanes',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('reg_number', sa.String(), nullable=False),
    sa.Column('total_seats', sa.Integer(), nullable=False),
    sa.Column('economy_seats', sa.Integer(), nullable=False),
    sa.Column('business_seats', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('airports',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=False),
    sa.Column('country', sa.String(length=256), nullable=False),
    sa.Column('city', sa.String(length=256), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('users',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('email', sa.String(), nullable=False),
    sa.Column('name', sa.String(), nullable=False),
    sa.Column('password', sa.String(), nullable=False),
    sa.Column('passport', sa.String(), nullable=True),
    sa.Column('registered_on', sa.DateTime(), nullable=False),
    sa.Column('is_admin', sa.Boolean(), nullable=False),
    sa.Column('confirmed', sa.Boolean(), nullable=False),
    sa.Column('confirmed_on', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email')
    )
    op.create_table('flights',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('departure_date', sa.DateTime(), nullable=False),
    sa.Column('departure_airport_id', sa.Integer(), nullable=False),
    sa.Column('arrival_date', sa.DateTime(), nullable=False),
    sa.Column('arrival_airport_id', sa.Integer(), nullable=False),
    sa.Column('status', sa.String(length=256), nullable=True),
    sa.Column('airplane_id', sa.Integer(), nullable=False),
    sa.Column('booked_business', sa.Integer(), nullable=True),
    sa.Column('booked_economy', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['airplane_id'], ['airplanes.id'], ),
    sa.ForeignKeyConstraint(['departure_airport_id'], ['airports.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('bookings',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('booking_date', sa.DateTime(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('flight_id', sa.Integer(), nullable=False),
    sa.Column('email_status', sa.String(length=120), nullable=False),
    sa.ForeignKeyConstraint(['flight_id'], ['flights.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('bookings')
    op.drop_table('flights')
    op.drop_table('users')
    op.drop_table('airports')
    op.drop_table('airplanes')
    # ### end Alembic commands ###

"""empty message

Revision ID: 4<PASSWORD>b
Revises: 
Create Date: 2022-03-19 11:56:05.576913

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '4bad<PASSWORD>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('airplanes',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('reg_number', sa.String(), nullable=False),
    sa.Column('total_seats', sa.Integer(), nullable=False),
    sa.Column('economy_seats', sa.Integer(), nullable=False),
    sa.Column('business_seats', sa.Integer(), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('airports',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=256), nullable=False),
    sa.Column('country', sa.String(length=256), nullable=False),
    sa.Column('city', sa.String(length=256), nullable=False),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('users',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('email', sa.String(), nullable=False),
    sa.Column('name', sa.String(), nullable=False),
    sa.Column('password', sa.String(), nullable=False),
    sa.Column('passport', sa.String(), nullable=True),
    sa.Column('registered_on', sa.DateTime(), nullable=False),
    sa.Column('is_admin', sa.Boolean(), nullable=False),
    sa.Column('confirmed', sa.Boolean(), nullable=False),
    sa.Column('confirmed_on', sa.DateTime(), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('email')
    )
    op.create_table('flights',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('departure_date', sa.DateTime(), nullable=False),
    sa.Column('departure_airport_id', sa.Integer(), nullable=False),
    sa.Column('arrival_date', sa.DateTime(), nullable=False),
    sa.Column('arrival_airport_id', sa.Integer(), nullable=False),
    sa.Column('status', sa.String(length=256), nullable=True),
    sa.Column('airplane_id', sa.Integer(), nullable=False),
    sa.Column('booked_business', sa.Integer(), nullable=True),
    sa.Column('booked_economy', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['airplane_id'], ['airplanes.id'], ),
    sa.ForeignKeyConstraint(['departure_airport_id'], ['airports.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('bookings',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('booking_date', sa.DateTime(), nullable=False),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('flight_id', sa.Integer(), nullable=False),
    sa.Column('email_status', sa.String(length=120), nullable=False),
    sa.ForeignKeyConstraint(['flight_id'], ['flights.id'], ),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('bookings')
    op.drop_table('flights')
    op.drop_table('users')
    op.drop_table('airports')
    op.drop_table('airplanes')
    # ### end Alembic commands ###

empty message  Revision ID: 4<PASSWORD>b Revises:  Create Date: 2022-03-19 11:56:05.576913 # 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 ###