"""empty message

Revision ID: af72304ae017
Revises: 
Create Date: 2020-01-30 21:09:14.404366

"""
from alembic import op
import sqlalchemy as sa


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


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "api_calls",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("name", sa.String(), nullable=True),
        sa.Column("resource", sa.String(), nullable=True),
        sa.Column("method", sa.String(), nullable=True),
        sa.Column("payload", sa.String(), nullable=True),
        sa.Column("authentication", sa.String(), nullable=True),
        sa.Column("username", sa.String(), nullable=True),
        sa.Column("password", sa.String(), nullable=True),
        sa.Column("value_template", sa.String(), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_table(
        "apps",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("name", sa.String(), nullable=True),
        sa.Column("prefix", sa.String(), nullable=True),
        sa.Column("url", sa.String(), nullable=True),
        sa.Column("icon", sa.String(), nullable=True),
        sa.Column("sidebar_icon", sa.String(), nullable=True),
        sa.Column("description", sa.String(), nullable=True),
        sa.Column("open_in", sa.String(), nullable=True),
        sa.Column("data_template", sa.String(), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_table(
        "files",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("name", sa.String(), nullable=True),
        sa.Column("path", sa.String(), nullable=True),
        sa.Column("external_path", sa.String(), nullable=True),
        sa.Column("cache", sa.String(), nullable=True),
        sa.Column("folder", sa.String(), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_table(
        "settings",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("theme", sa.String(), nullable=True),
        sa.Column("accent", sa.String(), nullable=True),
        sa.Column("background", sa.String(), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_table(
        "template_apps",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("name", sa.String(), nullable=True),
        sa.Column("prefix", sa.String(), nullable=True),
        sa.Column("url", sa.String(), nullable=True),
        sa.Column("icon", sa.String(), nullable=True),
        sa.Column("sidebar_icon", sa.String(), nullable=True),
        sa.Column("description", sa.String(), nullable=True),
        sa.Column("open_in", sa.String(), nullable=True),
        sa.PrimaryKeyConstraint("id"),
    )
    op.create_table(
        "user",
        sa.Column("id", sa.Integer(), nullable=False),
        sa.Column("username", sa.String(length=120), nullable=False),
        sa.Column("password", sa.String(length=60), nullable=False),
        sa.PrimaryKeyConstraint("id"),
        sa.UniqueConstraint("username"),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("user")
    op.drop_table("template_apps")
    op.drop_table("settings")
    op.drop_table("files")
    op.drop_table("apps")
    op.drop_table("api_calls")
    # ### end Alembic commands ###
