mirror of
https://github.com/simple-login/app.git
synced 2026-02-02 01:50:07 +08:00
50 lines
1.6 KiB
Python
50 lines
1.6 KiB
Python
"""empty message
|
|
|
|
Revision ID: 2e2b53afd819
|
|
Revises: 4a640c170d02
|
|
Create Date: 2019-11-15 13:55:21.975636
|
|
|
|
"""
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "2e2b53afd819"
|
|
down_revision = "4a640c170d02"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table("partner")
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table(
|
|
"partner",
|
|
sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
|
|
sa.Column(
|
|
"created_at", postgresql.TIMESTAMP(), autoincrement=False, nullable=False
|
|
),
|
|
sa.Column(
|
|
"updated_at", postgresql.TIMESTAMP(), autoincrement=False, nullable=True
|
|
),
|
|
sa.Column("email", sa.VARCHAR(length=128), autoincrement=False, nullable=True),
|
|
sa.Column("name", sa.VARCHAR(length=128), autoincrement=False, nullable=True),
|
|
sa.Column(
|
|
"website", sa.VARCHAR(length=1024), autoincrement=False, nullable=True
|
|
),
|
|
sa.Column(
|
|
"additional_information", sa.TEXT(), autoincrement=False, nullable=True
|
|
),
|
|
sa.Column("user_id", sa.INTEGER(), autoincrement=False, nullable=True),
|
|
sa.ForeignKeyConstraint(
|
|
["user_id"], ["users.id"], name="partner_user_id_fkey", ondelete="CASCADE"
|
|
),
|
|
sa.PrimaryKeyConstraint("id", name="partner_pkey"),
|
|
)
|
|
# ### end Alembic commands ###
|