add bus_bay

This commit is contained in:
zhuxu 2024-12-19 17:36:55 +08:00
parent de0a6217b4
commit d9000dc5b8
2 changed files with 87 additions and 5 deletions

View File

@ -92,7 +92,7 @@ CREATE TABLE IF NOT EXISTS public.syncmotor_bay
CONSTRAINT syncmotor_bay_id_PrimaryKey PRIMARY KEY (id),
CONSTRAINT syncmotor_bay_ForeignKey_component_id FOREIGN KEY (component_id)
REFERENCES public.page (id) MATCH SIMPLE
REFERENCES public.component (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
)
@ -103,8 +103,5 @@ ALTER TABLE IF EXISTS public.syncmotor_bay
OWNER to postgres;
COMMENT ON TABLE public.syncmotor_bay
IS '存储异步电动机的间隔信息
s下划线后面是符号
t下划线后面符号
';
IS '存储异步电动机的间隔信息';

85
ddl_6_bus_bay.sql Normal file
View File

@ -0,0 +1,85 @@
- Table: public.bus_bay
-- DROP
DROP TABLE IF EXISTS public.bus_bay;
DROP SEQUENCE IF EXISTS public.bus_bay_id_seq;
-- CREATE
CREATE SEQUENCE IF NOT EXISTS public.bus_bay_id_seq;
CREATE TABLE IF NOT EXISTS public.bus_bay
(
id integer NOT NULL DEFAULT nextval('bus_bay_id_seq'::regclass),
component_id integer NOT NULL,
dev_protect jsonb NOT NULL DEFAULT '{}'::jsonb,
dev_scada jsonb NOT NULL DEFAULT '{}'::jsonb,
dev_intelligent jsonb NOT NULL DEFAULT '{}'::jsonb,
dev_recording jsonb NOT NULL DEFAULT '{}'::jsonb,
dev_status jsonb NOT NULL DEFAULT '{}'::jsonb,
dev_etc jsonb NOT NULL DEFAULT '{}'::jsonb,
"v_Ia" varible NOT NULL,
"v_Ib" varible NOT NULL,
"v_Ic" varible NOT NULL,
"v_I0" varible NOT NULL,
"v_I1" varible NOT NULL,
"v_I2" varible NOT NULL,
"v_Ua" varible NOT NULL,
"v_Ub" varible NOT NULL,
"v_Uc" varible NOT NULL,
"v_U0" varible NOT NULL,
"v_U1" varible NOT NULL,
"v_U2" varible NOT NULL,
"v_Uab" varible NOT NULL,
"v_Ubc" varible NOT NULL,
"v_Uca" varible NOT NULL,
"v_Uarrow" varible NOT NULL,
"v_IA" varible NOT NULL,
"v_IB" varible NOT NULL,
"v_IC" varible NOT NULL,
"v_I0p" varible NOT NULL,
"v_I1p" varible NOT NULL,
"v_I2p" varible NOT NULL,
"v_UA" varible NOT NULL,
"v_UB" varible NOT NULL,
"v_UC" varible NOT NULL,
"v_U0p" varible NOT NULL,
"v_U1p" varible NOT NULL,
"v_U2p" varible NOT NULL,
"v_UAB" varible NOT NULL,
"v_UBC" varible NOT NULL,
"v_UCA" varible NOT NULL,
"v_Uarrowp" varible NOT NULL,
"v_P" varible NOT NULL,
"v_Q" varible NOT NULL,
"v_S" varible NOT NULL,
"v_PF" varible NOT NULL,
"v_f" varible NOT NULL,
"v_df_per_dt" varible NOT NULL,
"v_Temp" varible NOT NULL,
op integer NOT NULL DEFAULT '-1'::integer,
ts timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT bus_bay_id_PrimaryKey PRIMARY KEY (id),
CONSTRAINT bus_bay_ForeignKey_component_id FOREIGN KEY (component_id)
REFERENCES public.component (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
)
TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.syncmotor_bay
OWNER to postgres;
COMMENT ON TABLE public.syncmotor_bay
IS '存储母线的间隔信息';