"""empty message

Revision ID: 1cde9ea7a48f
Revises: 
Create Date: 2017-04-07 13:37:50.512285

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "1cde9ea7a48f"
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "user_logs",
        sa.Column("id", sa.String(length=80), nullable=False),
        sa.Column("user_id", sa.String(length=80), nullable=True),
        sa.Column("dataset_id", sa.String(length=80), nullable=True),
        sa.Column("last_access", sa.DateTime(), nullable=True),
        sa.ForeignKeyConstraint(
            ["dataset_id"],
            ["datasets.id"],
            name=op.f("fk_user_logs_dataset_id_datasets"),
        ),
        sa.ForeignKeyConstraint(
            ["user_id"], ["users.id"], name=op.f("fk_user_logs_user_id_users")
        ),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_user_logs")),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("user_logs")
    # ### end Alembic commands ###
