-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Ajout has_instance_permission à t_observation_details * Fix : ajout médias aux observation détails * Ajout média schéma * has_instance_permission sur nouveau object
- Loading branch information
1 parent
60e0219
commit 2445004
Showing
6 changed files
with
53 additions
and
3 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
38 changes: 38 additions & 0 deletions
38
...end/gn_module_monitoring/migrations/6f90dd1aaf69_add_observation_details_entry_in_bib_.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,38 @@ | ||
"""Add observation details entry in bib_tables_location | ||
Revision ID: 6f90dd1aaf69 | ||
Revises: be30fb5c1a56 | ||
Create Date: 2024-10-21 15:35:31.740577 | ||
""" | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "6f90dd1aaf69" | ||
down_revision = "be30fb5c1a56" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.execute( | ||
""" | ||
INSERT INTO gn_commons.bib_tables_location(table_desc, schema_name, table_name, pk_field, uuid_field_name) | ||
VALUES | ||
('Table centralisant les détails des observations réalisées lors d''une visite sur un site', | ||
'gn_monitoring', 't_observation_details', 'id_observation_detail', 'uuid_observation_detail') | ||
ON CONFLICT(schema_name, table_name) DO NOTHING; | ||
""" | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.execute( | ||
""" | ||
DELETE FROM gn_commons.bib_tables_location | ||
WHERE schema_name = 'gn_monitoring' AND table_name = 't_observation_details'; | ||
""" | ||
) |
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