mirror of https://github.com/stijndcl/didier
36 lines
873 B
Python
36 lines
873 B
Python
"""Add custom links
|
|
|
|
Revision ID: 3962636f3a3d
|
|
Revises: 346b408c362a
|
|
Create Date: 2022-08-10 00:54:05.668255
|
|
|
|
"""
|
|
import sqlalchemy as sa
|
|
|
|
from alembic import op
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "3962636f3a3d"
|
|
down_revision = "346b408c362a"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table(
|
|
"links",
|
|
sa.Column("link_id", sa.Integer(), nullable=False),
|
|
sa.Column("name", sa.Text(), nullable=False),
|
|
sa.Column("url", sa.Text(), nullable=False),
|
|
sa.PrimaryKeyConstraint("link_id"),
|
|
sa.UniqueConstraint("name"),
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table("links")
|
|
# ### end Alembic commands ###
|