Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl committed Mar 3, 2023
1 parent 9145552 commit 606d08c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def upgrade():
op.create_table_comment(
"cor_module_type",
"Table d'association des types de sites potentiellement associés à un module",
schema=monitorings_schema
schema=monitorings_schema,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,5 @@ def upgrade():
)



def downgrade():
op.drop_table("bib_type_site", schema=monitorings_schema)
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def upgrade():
op.create_table_comment(
"cor_type_site",
"Table d'association entre les sites et les types de sites",
schema=monitorings_schema
schema=monitorings_schema,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,35 @@


# revision identifiers, used by Alembic.
revision = 'e78003460441'
down_revision = '2003e18f248a'
revision = "e78003460441"
down_revision = "2003e18f248a"
branch_labels = None
depends_on = None


def upgrade():
op.execute("""
op.execute(
"""
ALTER TABLE gn_monitoring.t_observation_details
DROP CONSTRAINT pk_t_observation_details;
ALTER TABLE gn_monitoring.t_observation_details
ADD CONSTRAINT pk_t_observation_details PRIMARY KEY (id_observation_detail);
ALTER TABLE gn_monitoring.t_observation_details
ADD uuid_observation_detail UUID DEFAULT uuid_generate_v4() NOT NULL;
""")
"""
)


def downgrade():
op.execute("""
op.execute(
"""
ALTER TABLE gn_monitoring.t_observation_details
DROP CONSTRAINT pk_t_observation_details;
ALTER TABLE gn_monitoring.t_observation_details
ADD CONSTRAINT pk_t_observation_details PRIMARY KEY (id_observation);
ALTER TABLE gn_monitoring.t_observation_details
DROP COLUMN uuid_observation_detail;
""")
"""
)

0 comments on commit 606d08c

Please sign in to comment.