Skip to content

Commit

Permalink
Change nullable values for adding columns in three dbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vebop committed Oct 18, 2024
1 parent dbe4df8 commit 26cdb92
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "53707815663e"
down_revision: Union[str, None] = "59776480aa4d"
Expand All @@ -30,7 +31,7 @@ def upgrade() -> None:
sa.Column(
"day_obs",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Day of observation.",
),
schema="cdb_latiss",
Expand All @@ -40,7 +41,7 @@ def upgrade() -> None:
sa.Column(
"seq_num",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Sequence number.",
),
schema="cdb_latiss",
Expand All @@ -63,7 +64,7 @@ def upgrade() -> None:
sa.Column(
"day_obs",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Day of observation.",
),
schema="cdb_latiss",
Expand All @@ -73,7 +74,7 @@ def upgrade() -> None:
sa.Column(
"seq_num",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Sequence number.",
),
schema="cdb_latiss",
Expand All @@ -92,7 +93,7 @@ def upgrade() -> None:
sa.Column(
"day_obs",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Day of observation.",
),
schema="cdb_latiss",
Expand All @@ -102,7 +103,7 @@ def upgrade() -> None:
sa.Column(
"seq_num",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Sequence number.",
),
schema="cdb_latiss",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "bf7ed261cc12"
down_revision: Union[str, None] = "d54a539aad4d"
Expand All @@ -33,7 +34,7 @@ def upgrade() -> None:
sa.Column(
"day_obs",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Day of observation.",
),
schema="cdb_lsstcomcam",
Expand All @@ -43,7 +44,7 @@ def upgrade() -> None:
sa.Column(
"seq_num",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Sequence number.",
),
schema="cdb_lsstcomcam",
Expand Down Expand Up @@ -75,7 +76,7 @@ def upgrade() -> None:
sa.Column(
"day_obs",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Day of observation.",
),
schema="cdb_lsstcomcam",
Expand All @@ -85,7 +86,7 @@ def upgrade() -> None:
sa.Column(
"seq_num",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Sequence number.",
),
schema="cdb_lsstcomcam",
Expand All @@ -104,7 +105,7 @@ def upgrade() -> None:
sa.Column(
"day_obs",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Day of observation.",
),
schema="cdb_lsstcomcam",
Expand All @@ -114,7 +115,7 @@ def upgrade() -> None:
sa.Column(
"seq_num",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Sequence number.",
),
schema="cdb_lsstcomcam",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "5f50b32c44fc"
down_revision: Union[str, None] = "3f8460378c1e"
Expand All @@ -26,7 +27,7 @@ def upgrade() -> None:
sa.Column(
"day_obs",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Day of observation.",
),
schema="cdb_lsstcomcamsim",
Expand All @@ -36,7 +37,7 @@ def upgrade() -> None:
sa.Column(
"seq_num",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Sequence number.",
),
schema="cdb_lsstcomcamsim",
Expand Down Expand Up @@ -75,7 +76,7 @@ def upgrade() -> None:
sa.Column(
"day_obs",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Day of observation.",
),
schema="cdb_lsstcomcamsim",
Expand All @@ -85,7 +86,7 @@ def upgrade() -> None:
sa.Column(
"seq_num",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Sequence number.",
),
schema="cdb_lsstcomcamsim",
Expand All @@ -104,7 +105,7 @@ def upgrade() -> None:
sa.Column(
"day_obs",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Day of observation.",
),
schema="cdb_lsstcomcamsim",
Expand All @@ -114,7 +115,7 @@ def upgrade() -> None:
sa.Column(
"seq_num",
sa.INTEGER().with_variant(mysql.INTEGER(), "mysql").with_variant(sa.INTEGER(), "postgresql"),
nullable=False,
nullable=True,
comment="Sequence number.",
),
schema="cdb_lsstcomcamsim",
Expand Down

0 comments on commit 26cdb92

Please sign in to comment.