Skip to content

Commit acdd98a

Browse files
authored
updating SQL command for soft deleting datasets (#70)
1 parent 0a64feb commit acdd98a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

api/src/main/java/marquez/db/DatasetDao.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ DatasetRow upsert(
275275
@SqlUpdate(
276276
"""
277277
UPDATE datasets d
278-
SET is_hidden = true
278+
SET is_hidden = true,
279+
is_deleted = true,
280+
updated_at = CURRENT_TIMESTAMP
279281
FROM namespaces n
280282
WHERE n.uuid=d.namespace_uuid
281283
AND n.name=:namespaceName
@@ -285,7 +287,9 @@ DatasetRow upsert(
285287
@SqlQuery(
286288
"""
287289
UPDATE datasets d
288-
SET is_hidden = true
290+
SET is_hidden = true,
291+
is_deleted = true,
292+
updated_at = CURRENT_TIMESTAMP
289293
FROM namespaces n
290294
WHERE n.uuid = d.namespace_uuid
291295
AND n.name=:namespaceName AND d.name=:name

0 commit comments

Comments
 (0)