-
Notifications
You must be signed in to change notification settings - Fork 11
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 #488 from PnX-SI/develop
Develop > Master / 2.2.3
- Loading branch information
Showing
17 changed files
with
246 additions
and
97 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
2.2.2 | ||
2.2.3 |
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
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
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
31 changes: 31 additions & 0 deletions
31
backend/gn_module_import/migrations/2896cf965dd6_unique_import_error.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,31 @@ | ||
"""unique import error | ||
Revision ID: 2896cf965dd6 | ||
Revises: d6bf8eaf088c | ||
Create Date: 2023-09-28 10:19:10.133530 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "2896cf965dd6" | ||
down_revision = "ea67bf7b6888" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.create_unique_constraint( | ||
schema="gn_imports", | ||
table_name="t_user_errors", | ||
columns=["id_import", "id_error", "column_error"], | ||
constraint_name="t_user_errors_un", | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.drop_constraint( | ||
schema="gn_imports", table_name="t_user_errors", constraint_name="t_user_errors_un" | ||
) |
50 changes: 50 additions & 0 deletions
50
backend/gn_module_import/migrations/ea67bf7b6888_remove_cd_fk.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,50 @@ | ||
"""remove cd fk | ||
Revision ID: ea67bf7b6888 | ||
Revises: d6bf8eaf088c | ||
Create Date: 2023-09-27 15:37:19.286693 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "ea67bf7b6888" | ||
down_revision = "d6bf8eaf088c" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.drop_constraint( | ||
schema="gn_imports", | ||
table_name="t_imports_synthese", | ||
constraint_name="t_imports_synthese_cd_nom_fkey", | ||
) | ||
op.drop_constraint( | ||
schema="gn_imports", | ||
table_name="t_imports_synthese", | ||
constraint_name="t_imports_synthese_cd_hab_fkey", | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.create_foreign_key( | ||
constraint_name="t_imports_synthese_cd_nom_fkey", | ||
source_schema="gn_imports", | ||
source_table="t_imports_synthese", | ||
local_cols=["cd_nom"], | ||
referent_schema="taxonomie", | ||
referent_table="taxref", | ||
remote_cols=["cd_nom"], | ||
) | ||
op.create_foreign_key( | ||
constraint_name="t_imports_synthese_cd_hab_fkey", | ||
source_schema="gn_imports", | ||
source_table="t_imports_synthese", | ||
local_cols=["cd_hab"], | ||
referent_schema="ref_habitats", | ||
referent_table="habref", | ||
remote_cols=["cd_hab"], | ||
) |
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
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
Oops, something went wrong.