mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
78 lines
2.2 KiB
Python
78 lines
2.2 KiB
Python
"""empty message
|
|
|
|
Revision ID: 27da3ceea723
|
|
Revises: 00daa8c472ba
|
|
Create Date: 2020-11-08 16:14:01.866196
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
import sqlalchemy_utils
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = "27da3ceea723"
|
|
down_revision = "00daa8c472ba"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
# op.drop_table('spatial_ref_sys')
|
|
op.add_column(
|
|
"adminunit",
|
|
sa.Column(
|
|
"widget_background_color",
|
|
sqlalchemy_utils.types.color.ColorType(length=20),
|
|
nullable=True,
|
|
),
|
|
)
|
|
op.add_column(
|
|
"adminunit", sa.Column("widget_font", sa.Unicode(length=255), nullable=True)
|
|
)
|
|
op.add_column(
|
|
"adminunit",
|
|
sa.Column(
|
|
"widget_link_color",
|
|
sqlalchemy_utils.types.color.ColorType(length=20),
|
|
nullable=True,
|
|
),
|
|
)
|
|
op.add_column(
|
|
"adminunit",
|
|
sa.Column(
|
|
"widget_primary_color",
|
|
sqlalchemy_utils.types.color.ColorType(length=20),
|
|
nullable=True,
|
|
),
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_column("adminunit", "widget_primary_color")
|
|
op.drop_column("adminunit", "widget_link_color")
|
|
op.drop_column("adminunit", "widget_font")
|
|
op.drop_column("adminunit", "widget_background_color")
|
|
op.create_table(
|
|
"spatial_ref_sys",
|
|
sa.Column("srid", sa.INTEGER(), autoincrement=False, nullable=False),
|
|
sa.Column(
|
|
"auth_name", sa.VARCHAR(length=256), autoincrement=False, nullable=True
|
|
),
|
|
sa.Column("auth_srid", sa.INTEGER(), autoincrement=False, nullable=True),
|
|
sa.Column(
|
|
"srtext", sa.VARCHAR(length=2048), autoincrement=False, nullable=True
|
|
),
|
|
sa.Column(
|
|
"proj4text", sa.VARCHAR(length=2048), autoincrement=False, nullable=True
|
|
),
|
|
sa.CheckConstraint(
|
|
"(srid > 0) AND (srid <= 998999)", name="spatial_ref_sys_srid_check"
|
|
),
|
|
sa.PrimaryKeyConstraint("srid", name="spatial_ref_sys_pkey"),
|
|
)
|
|
# ### end Alembic commands ###
|