From d48d2721c6cad0a4046fce3e475485e516f035ce Mon Sep 17 00:00:00 2001 From: pashko Date: Wed, 8 May 2024 14:38:29 +0800 Subject: [PATCH] change README.md --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7cf8632..444802b 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,11 @@ mvn liquibase:history > liquibase_log/liquibase_log_history-$(date +%Y%m%d%H%M%S ``` ```sql -DO $$ DECLARE -r RECORD; -BEGIN -FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = -'public') LOOP -EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(r.tablename) || ' -CASCADE'; -END LOOP; -END $$; +do $$ declare + r record; +begin + for r in (select tablename from pg_tables where schemaname = 'my-schema-name') loop + execute 'drop table if exists public.' || quote_ident(r.tablename) || ' cascade'; + end loop; +end $$; ``` \ No newline at end of file