Browse Source

清除村信息

dev
CODE 11 months ago
parent
commit
8eed40a281
  1. 14
      scripts/1.4.0/data/3.clear_village.sql
  2. 10
      scripts/1.4.0/data/4_village.sql
  3. 8
      scripts/1.4.0/data/5_village_distance.sql

14
scripts/1.4.0/data/3.clear_village.sql

@ -0,0 +1,14 @@
DO $$
BEGIN
RAISE NOTICE '!!! 请注意 这将删除所有已有的村信息 9s后继续';
PERFORM pg_sleep(9); -- 等待一小段时间
END $$;
DELETE FROM "public"."village_distance" WHERE "id" > 0;
SELECT setval('village_distance_id_seq', 1);
DELETE FROM "public"."village" WHERE "id" > 0;
SELECT setval('village_id_seq', 1);

10
scripts/1.4.0/data/3_village.sql → scripts/1.4.0/data/4_village.sql

@ -15,16 +15,6 @@
Date: 13/12/2023 11:19:37
*/
DO $$
BEGIN
RAISE NOTICE '!!! 请注意 这将删除所有已有的村信息 9s后继续';
PERFORM pg_sleep(9); -- 等待一小段时间
END $$;
DELETE FROM "public"."village" WHERE "id" > 0;
SELECT setval('village_id_seq', 1);
-- ----------------------------
-- Records of village
-- ----------------------------

8
scripts/1.4.0/data/4_village_distance.sql → scripts/1.4.0/data/5_village_distance.sql

@ -15,14 +15,6 @@
Date: 13/12/2023 11:21:44
*/
DO $$
BEGIN
RAISE NOTICE '!!! 请注意 这将删除所有已有的村距离信息 9s后继续';
PERFORM pg_sleep(9); -- 等待一小段时间
END $$;
DELETE FROM "public"."village_distance" WHERE "id" > 0;
SELECT setval('village_distance_id_seq', 1);
-- ----------------------------
-- Records of village_distance
-- ----------------------------
Loading…
Cancel
Save