From 74dfc905ec3d9aac561c40db8c800c754b07ebe5 Mon Sep 17 00:00:00 2001 From: Wang Yan Date: Tue, 13 Dec 2022 15:32:57 +0800 Subject: [PATCH] remove the redundant data from table artifact_blob (#17937) use sql in the migration process to delete all the useless data of table artifact_blob Signed-off-by: Wang Yan Signed-off-by: Wang Yan --- make/migrations/postgresql/0110_2.8.0_schema.up.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 make/migrations/postgresql/0110_2.8.0_schema.up.sql diff --git a/make/migrations/postgresql/0110_2.8.0_schema.up.sql b/make/migrations/postgresql/0110_2.8.0_schema.up.sql new file mode 100644 index 000000000..0b4daea1f --- /dev/null +++ b/make/migrations/postgresql/0110_2.8.0_schema.up.sql @@ -0,0 +1,2 @@ +/* remove the redundant data from table artifact_blob */ +delete from artifact_blob afb where not exists (select digest from blob b where b.digest = afb.digest_af); \ No newline at end of file