"""initial

Peek Plugin Database Migration Script

Revision ID: 3fec57d8da58
Revises: 
Create Date: 2017-07-13 22:44:36.374877

"""

# revision identifiers, used by Alembic.
revision = '3fec57d8da58'
down_revision = None
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa
import geoalchemy2


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('UserLoggedIn',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('loggedInDateTime', sa.DateTime(), nullable=False),
    sa.Column('userId', sa.String(length=50), nullable=True),
    sa.Column('clientDeviceToken', sa.String(length=100), nullable=False),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('clientDeviceToken'),
    sa.UniqueConstraint('userId'),
    schema='core_user'
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('UserLoggedIn', schema='core_user')
    # ### end Alembic commands ###
