-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(occtax) switch default value between sexe and object denombrement
- Loading branch information
1 parent
ec1f160
commit 4afa6e4
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
contrib/occtax/backend/occtax/migrations/43ecf0836b4a_invert_count_default.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,34 @@ | ||
"""invert count default | ||
Revision ID: 43ecf0836b4a | ||
Revises: e170d1902137 | ||
Create Date: 2024-01-23 09:36:40.189931 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "43ecf0836b4a" | ||
down_revision = "e170d1902137" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.execute( | ||
""" | ||
ALTER TABLE pr_occtax.cor_counting_occtax | ||
ALTER COLUMN id_nomenclature_sex SET DEFAULT pr_occtax.get_default_nomenclature_value('SEXE'); | ||
ALTER TABLE pr_occtax.cor_counting_occtax | ||
ALTER COLUMN id_nomenclature_obj_count SET DEFAULT pr_occtax.get_default_nomenclature_value('OBJ_DENBR'); | ||
""" | ||
) | ||
|
||
|
||
def downgrade(): | ||
pass |