Skip to content

Commit d95331f

Browse files
Fix script
1 parent d4b90ff commit d95331f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/postgres-database/src/simcore_postgres_database/migration/versions/c9c165644731_update_project_last_changed_date_column_.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
depends_on = None
1717

1818

19-
update_projects_last_changed_date = sa.DDL(
19+
update_projects_last_change_date = sa.DDL(
2020
"""
21-
CREATE OR REPLACE FUNCTION update_projects_last_changed_date()
21+
CREATE OR REPLACE FUNCTION update_projects_last_change_date()
2222
RETURNS TRIGGER AS $$
2323
DECLARE
2424
project_uuid VARCHAR;
@@ -30,7 +30,7 @@
3030
END IF;
3131
3232
UPDATE projects
33-
SET last_changed_date = NOW()
33+
SET last_change_date = NOW()
3434
WHERE uuid = project_uuid;
3535
3636
RETURN NULL;
@@ -46,18 +46,18 @@
4646
CREATE TRIGGER projects_nodes_changed
4747
AFTER INSERT OR UPDATE OR DELETE ON projects_nodes
4848
FOR EACH ROW
49-
EXECUTE FUNCTION update_projects_last_changed_date();
49+
EXECUTE FUNCTION update_projects_last_change_date();
5050
"""
5151
)
5252

5353

5454
def upgrade():
55-
op.execute(update_projects_last_changed_date)
55+
op.execute(update_projects_last_change_date)
5656
op.execute(projects_nodes_changed)
5757

5858

5959
def downgrade():
60-
op.execute(sa.DDL("DROP FUNCTION IF EXISTS update_projects_last_changed_date();"))
60+
op.execute(sa.DDL("DROP FUNCTION IF EXISTS update_projects_last_change_date();"))
6161
op.execute(
6262
sa.DDL("DROP TRIGGER IF EXISTS projects_nodes_changed ON projects_nodes;")
6363
)

0 commit comments

Comments
 (0)