<gh_stars>0
"""empty message

Revision ID: 0ffd29cae080
Revises: <PASSWORD>
Create Date: 2021-05-31 13:13:39.622204

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "0ffd29cae080"
down_revision = "<PASSWORD>"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "error_log",
        sa.Column("id", sa.INTEGER(), nullable=False, comment="Unique row identifier"),
        sa.Column(
            "code",
            sa.String(),
            nullable=True,
            comment="Application Error identifier code",
        ),
        sa.Column("user_id", sa.Integer(), nullable=True, comment="logged in user"),
        sa.Column("message", sa.String(), nullable=True, comment="error message"),
        sa.Column(
            "stack_trace", sa.String(), nullable=True, comment="error stack trace"
        ),
        sa.Column(
            "date_added",
            sa.DateTime(timezone=True),
            nullable=False,
            comment="row timestamp",
        ),
        sa.Column("added_by_id", sa.INTEGER(), nullable=True),
        sa.Column("session_id", sa.INTEGER(), nullable=True),
        sa.ForeignKeyConstraint(
            ["added_by_id"], ["users.id"], name=op.f("fk_error_log_added_by_id_users")
        ),
        sa.ForeignKeyConstraint(
            ["session_id"],
            ["sessions.id"],
            name=op.f("fk_error_log_session_id_sessions"),
        ),
        sa.ForeignKeyConstraint(
            ["user_id"], ["users.id"], name=op.f("fk_error_log_user_id_users")
        ),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_error_log")),
    )
    # ### end Alembic commands ###


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

"""empty message

Revision ID: 0ffd29cae080
Revises: <PASSWORD>
Create Date: 2021-05-31 13:13:39.622204

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "0ffd29cae080"
down_revision = "<PASSWORD>"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "error_log",
        sa.Column("id", sa.INTEGER(), nullable=False, comment="Unique row identifier"),
        sa.Column(
            "code",
            sa.String(),
            nullable=True,
            comment="Application Error identifier code",
        ),
        sa.Column("user_id", sa.Integer(), nullable=True, comment="logged in user"),
        sa.Column("message", sa.String(), nullable=True, comment="error message"),
        sa.Column(
            "stack_trace", sa.String(), nullable=True, comment="error stack trace"
        ),
        sa.Column(
            "date_added",
            sa.DateTime(timezone=True),
            nullable=False,
            comment="row timestamp",
        ),
        sa.Column("added_by_id", sa.INTEGER(), nullable=True),
        sa.Column("session_id", sa.INTEGER(), nullable=True),
        sa.ForeignKeyConstraint(
            ["added_by_id"], ["users.id"], name=op.f("fk_error_log_added_by_id_users")
        ),
        sa.ForeignKeyConstraint(
            ["session_id"],
            ["sessions.id"],
            name=op.f("fk_error_log_session_id_sessions"),
        ),
        sa.ForeignKeyConstraint(
            ["user_id"], ["users.id"], name=op.f("fk_error_log_user_id_users")
        ),
        sa.PrimaryKeyConstraint("id", name=op.f("pk_error_log")),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("error_log")
    # ### end Alembic commands ###
empty message  Revision ID: 0ffd29cae080 Revises: <PASSWORD> Create Date: 2021-05-31 13:13:39.622204 # 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 ###