cl_ddl/ddl_6_bus_bay.sql

85 lines
2.4 KiB
MySQL
Raw Permalink Normal View History

2024-12-19 20:11:05 +08:00
-- Table: public.bus_bay
2024-12-19 17:36:55 +08:00
-- 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;
2024-12-19 20:11:05 +08:00
ALTER TABLE IF EXISTS public.bus_bay
2024-12-19 17:36:55 +08:00
OWNER to postgres;
2024-12-19 20:11:05 +08:00
COMMENT ON TABLE public.bus_bay
2024-12-19 17:36:55 +08:00
IS '存储母线的间隔信息';