-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from GispoCoding/237-lhttieto-pvm-puuttuu-tie…
…tomallista Add detachment_date field to source_data table
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
.../migrations/versions/2024_03_07_0914-0a8a2fecda2a_add_detachment_date_field_to_source_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"""add_detachment_date_field_to_source_data_table | ||
Revision ID: 0a8a2fecda2a | ||
Revises: f085148de65d | ||
Create Date: 2024-03-07 09:14:40.622499 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# import geoalchemy2 | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "0a8a2fecda2a" | ||
down_revision: Union[str, None] = "4ec52508acf1" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"source_data", | ||
sa.Column("detachment_date", sa.DateTime(), nullable=False), | ||
schema="hame", | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("source_data", "detachment_date", schema="hame") | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters