You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
"""Initial migration
|
|
|
|
Revision ID: 697808db5f01
|
|
Revises:
|
|
Create Date: 2020-02-15 11:03:23.506445
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "697808db5f01"
|
|
down_revision = None
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table(
|
|
"todo",
|
|
sa.Column("id", sa.BigInteger(), nullable=False),
|
|
sa.Column(
|
|
"created_date",
|
|
sa.DateTime(timezone=True),
|
|
server_default=sa.text("TIMEZONE('utc', CURRENT_TIMESTAMP)"),
|
|
nullable=True,
|
|
),
|
|
sa.Column(
|
|
"modified_date",
|
|
sa.DateTime(timezone=True),
|
|
server_default=sa.text("TIMEZONE('utc', CURRENT_TIMESTAMP)"),
|
|
nullable=True,
|
|
),
|
|
sa.Column("todo", sa.Text(), nullable=True),
|
|
sa.Column("complete", sa.Boolean(), nullable=True),
|
|
sa.PrimaryKeyConstraint("id"),
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table("todo")
|
|
# ### end Alembic commands ###
|