Skip to content
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5cd5119
Feature:1221 - Make visibility of auto-approval toggle configurable b…
anushka-singh Apr 25, 2024
b752ba3
Merge conflicts resolve
anushka-singh Jun 10, 2024
ce3b56d
Merge branch 'main' of https://github.com/anushka-singh/aws-dataall
anushka-singh Jun 14, 2024
3f4340e
Merge branch 'main' of https://github.com/anushka-singh/aws-dataall
anushka-singh Jun 20, 2024
32bea9d
Data712 y branch 2 5 (#375)
Jun 18, 2024
382a924
Data712 y branch 2 5 (#377)
Jun 18, 2024
653a480
Data712 y branch 2 5 (#381)
Jun 18, 2024
93b7f9b
Persistent emails
anushka-singh Jun 20, 2024
b73d12a
Persistent emails
anushka-singh Jun 20, 2024
e8dd359
Persistent emails
anushka-singh Jun 20, 2024
04994b5
Persistent emails
anushka-singh Jun 20, 2024
fa5e7df
Persistent emails
anushka-singh Jun 20, 2024
be83075
Persistent emails
anushka-singh Jun 20, 2024
b5379aa
lint fix
anushka-singh Jun 20, 2024
79c5c5b
Merge branch 'main' into issue1248
anushka-singh Jun 24, 2024
2a192c4
Merge branch 'main' of https://github.com/anushka-singh/aws-dataall
anushka-singh Jun 25, 2024
2f38371
Merge conflicts resolve
anushka-singh Jun 25, 2024
86ac2cd
Addressed comments
anushka-singh Jun 25, 2024
c55521a
Addressed comments
anushka-singh Jun 25, 2024
b768c30
Merge branch 'main' of https://github.com/anushka-singh/aws-dataall
anushka-singh Jun 25, 2024
eca38ae
Merge branch 'data-dot-all:main' into main
anushka-singh Jun 25, 2024
bf030fb
Merge branch 'main' of https://github.com/anushka-singh/aws-dataall
anushka-singh Aug 5, 2024
90a630c
merge conflict
anushka-singh Oct 13, 2025
5738079
Issue1867: Fix entity type in trigger function
anushka-singh Oct 13, 2025
3419b13
Issue1867: Fix entity type in trigger function
anushka-singh Oct 13, 2025
42b1ae3
Issue1867: Fix entity type in trigger function
anushka-singh Oct 13, 2025
d6d7b4f
Issue1867: Fix entity type in trigger function
anushka-singh Oct 13, 2025
55be6b6
Issue1867: Fix entity type in trigger function
anushka-singh Oct 14, 2025
a8b7f74
Issue1867: Fix entity type in trigger function
anushka-singh Oct 14, 2025
895242d
Issue1867: Fix entity type in trigger function
anushka-singh Oct 14, 2025
299746c
Issue1867: Fix entity type in trigger function
anushka-singh Oct 14, 2025
91dc3ed
Issue1867: Fix entity type in trigger function
anushka-singh Oct 14, 2025
13e8d23
Issue1867: Fix entity type in trigger function
anushka-singh Oct 14, 2025
dbbce12
Fix alembic.ini script_location path
anushka-singh Oct 14, 2025
b107ddb
Issue1867: Fix entity type in trigger function
anushka-singh Oct 14, 2025
b59db9f
Issue1867: Fix entity type in trigger function
anushka-singh Oct 14, 2025
ff2b64c
Issue1867: ruff format
anushka-singh Oct 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"""fix_mf_trigger_entity_type
Revision ID: a1b2c3d4e5f7
Revises: ba2da94739ab
Create Date: 2025-10-03 12:00:00.000000
"""

from alembic import op
import os

# revision identifiers used by Alembic.
revision = 'a1b2c3d4e5f7'
down_revision = 'ba2da94739ab'
branch_labels = None
depends_on = None

ENVNAME = os.getenv('envname', 'local')


def upgrade():
# Fix the entity type in the dataset delete trigger function
# Original had 'Dataset' (generic), should be 'S3-Dataset' (specific to S3 datasets)
SQL_DATASET_TRIGGER_DEF = """
CREATE OR REPLACE FUNCTION dataset_delete_trigger_function()
RETURNS TRIGGER AS $$
BEGIN
DELETE FROM {SCHEMA_NAME}.attached_metadata_form
WHERE "entityUri" = OLD."datasetUri"
AND "entityType" = 'S3-Dataset';
RETURN OLD;
END;
$$ LANGUAGE plpgsql;
""".format(SCHEMA_NAME=ENVNAME)

op.execute(SQL_DATASET_TRIGGER_DEF) # nosemgrep


def downgrade():
# Revert back to the original version
SQL_DATASET_TRIGGER_DEF = """
CREATE OR REPLACE FUNCTION dataset_delete_trigger_function()
RETURNS TRIGGER AS $$
BEGIN
DELETE FROM {SCHEMA_NAME}.attached_metadata_form
WHERE "entityUri" = OLD."datasetUri"
AND "entityType" = 'Dataset';
RETURN OLD;
END;
$$ LANGUAGE plpgsql;
""".format(SCHEMA_NAME=ENVNAME)

op.execute(SQL_DATASET_TRIGGER_DEF) # nosemgrep
Loading