From d2fb604894dff8a61e4bbf8f056c7a0823d4ad62 Mon Sep 17 00:00:00 2001 From: zhuxu Date: Wed, 21 May 2025 18:11:32 +0800 Subject: [PATCH] remove page_id, move status --- model/ddl_1_page.sql | 1 - model/ddl_2_component.sql | 2 +- model/ddl_3_topologic.sql | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model/ddl_1_page.sql b/model/ddl_1_page.sql index 25fcc19..88a6d2c 100644 --- a/model/ddl_1_page.sql +++ b/model/ddl_1_page.sql @@ -16,7 +16,6 @@ CREATE TABLE IF NOT EXISTS public.page id integer NOT NULL DEFAULT nextval('page_id_seq'::regclass), tag character varying(32) COLLATE pg_catalog."default" NOT NULL, name character varying(64) COLLATE pg_catalog."default" NOT NULL, - status integer NOT NULL DEFAULT '-1'::integer, label jsonb NOT NULL DEFAULT '{}'::jsonb, context jsonb NOT NULL DEFAULT '{}'::jsonb, description character varying(512) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying, diff --git a/model/ddl_2_component.sql b/model/ddl_2_component.sql index 4de20e6..7c90e9c 100644 --- a/model/ddl_2_component.sql +++ b/model/ddl_2_component.sql @@ -23,10 +23,10 @@ CREATE TABLE IF NOT EXISTS public.component type integer NOT NULL, in_service boolean DEFAULT false, state integer NOT NULL DEFAULT 0, + status integer NOT NULL DEFAULT '-1'::integer, -- 编辑是否完成 connection jsonb NOT NULL DEFAULT '{}'::jsonb, label jsonb NOT NULL DEFAULT '{}'::jsonb, context jsonb NOT NULL DEFAULT '{}'::jsonb, - page_id integer NOT NULL, op integer NOT NULL DEFAULT '-1'::integer, ts timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, CONSTRAINT component_id_PrimaryKey PRIMARY KEY (id), diff --git a/model/ddl_3_topologic.sql b/model/ddl_3_topologic.sql index cde012b..7eb4338 100644 --- a/model/ddl_3_topologic.sql +++ b/model/ddl_3_topologic.sql @@ -8,9 +8,10 @@ CREATE SEQUENCE IF NOT EXISTS public.topologic_id_seq; CREATE TABLE IF NOT EXISTS public.topologic ( id integer NOT NULL DEFAULT nextval('topologic_id_seq'::regclass), - page_id integer NOT NULL, uuid_from uuid, uuid_to uuid, + from_pin uuid, + to_pin uuid, flag integer DEFAULT 0, description character varying(512) COLLATE pg_catalog."default", op integer NOT NULL DEFAULT '-1'::integer,