"""tables

Revision ID: 4d6955a953a5
Revises: 3c282ee838e3
Create Date: 2019-12-31 11:24:45.237158

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '4d6955a953a5'
down_revision = '3c282ee838e3'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index('object_firstmjd', 'astro_object', ['firstmjd'], unique=False, postgresql_using='btree')
    op.create_index('object_lastmjd', 'astro_object', ['lastmjd'], unique=False, postgresql_using='btree')
    op.create_index('object_nobs', 'astro_object', ['nobs'], unique=False, postgresql_using='btree')
    op.create_index('mag_first', 'magnitude_statistics', ['first'], unique=False, postgresql_using='btree')
    op.create_index('mag_last', 'magnitude_statistics', ['last'], unique=False, postgresql_using='btree')
    op.create_index('mag_max', 'magnitude_statistics', ['max_mag'], unique=False, postgresql_using='btree')
    op.create_index('mag_mean', 'magnitude_statistics', ['mean'], unique=False, postgresql_using='btree')
    op.create_index('mag_median', 'magnitude_statistics', ['median'], unique=False, postgresql_using='btree')
    op.create_index('mag_min', 'magnitude_statistics', ['min_mag'], unique=False, postgresql_using='btree')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('mag_min', table_name='magnitude_statistics')
    op.drop_index('mag_median', table_name='magnitude_statistics')
    op.drop_index('mag_mean', table_name='magnitude_statistics')
    op.drop_index('mag_max', table_name='magnitude_statistics')
    op.drop_index('mag_last', table_name='magnitude_statistics')
    op.drop_index('mag_first', table_name='magnitude_statistics')
    op.drop_index('object_nobs', table_name='astro_object')
    op.drop_index('object_lastmjd', table_name='astro_object')
    op.drop_index('object_firstmjd', table_name='astro_object')
    # ### end Alembic commands ###
