eg:
#脚本名称
V20220527090700__create_table_test_event.sql
#脚本内容
CREATE TABLE public.test_event (
id int8 GENERATED ALWAYS AS IDENTITY (cache 100) PRIMARY KEY,
event_time int8 NOT NULL,
event_type int4 NULL,
priority int4 NULL,
longitude float8 NULL,
latitude float8 NULL,
altitude float4 NULL,
create_time timestamp NULL,
latest_update_time timestamp NULL,
deleted int2 DEFAULT 0
);
COMMENT ON COLUMN public.event_shadow.event_time IS '事件时间';
CREATE UNIQUE INDEX uindex_sid_eventtime on public.test_event (event_time); |