first
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE "record_diary"
|
||||
ADD COLUMN "count" int4 NOT NULL DEFAULT 0,
|
||||
ADD COLUMN "start_time" timestamp,
|
||||
ADD COLUMN "end_time" timestamp;
|
||||
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE "record_alarm"
|
||||
ADD COLUMN "count" int4 NOT NULL DEFAULT 0,
|
||||
ADD COLUMN "start_time" timestamp,
|
||||
ADD COLUMN "end_time" timestamp;
|
||||
@@ -0,0 +1,92 @@
|
||||
INSERT INTO
|
||||
"public"."frame_config" (
|
||||
"id",
|
||||
"key",
|
||||
"value",
|
||||
"sort_number",
|
||||
"is_enable",
|
||||
"is_delete",
|
||||
"create_at",
|
||||
"create_by",
|
||||
"update_at",
|
||||
"update_by",
|
||||
"remark",
|
||||
"extend"
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
gen_random_uuid (),
|
||||
'DiaryWindowSeconds',
|
||||
'60',
|
||||
'0',
|
||||
't',
|
||||
'f',
|
||||
'2026-03-12 12:00:00.00000',
|
||||
'FASS.Mvc',
|
||||
'2026-03-12 12:00:00.00000',
|
||||
'FASS.Mvc',
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
"public"."frame_config" (
|
||||
"id",
|
||||
"key",
|
||||
"value",
|
||||
"sort_number",
|
||||
"is_enable",
|
||||
"is_delete",
|
||||
"create_at",
|
||||
"create_by",
|
||||
"update_at",
|
||||
"update_by",
|
||||
"remark",
|
||||
"extend"
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
gen_random_uuid (),
|
||||
'AlarmWindowSeconds',
|
||||
'60',
|
||||
'0',
|
||||
't',
|
||||
'f',
|
||||
'2026-03-12 12:00:00.00000',
|
||||
'FASS.Mvc',
|
||||
'2026-03-12 12:00:00.00000',
|
||||
'FASS.Mvc',
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
"public"."frame_config" (
|
||||
"id",
|
||||
"key",
|
||||
"value",
|
||||
"sort_number",
|
||||
"is_enable",
|
||||
"is_delete",
|
||||
"create_at",
|
||||
"create_by",
|
||||
"update_at",
|
||||
"update_by",
|
||||
"remark",
|
||||
"extend"
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
gen_random_uuid (),
|
||||
'TrafficWindowSeconds',
|
||||
'30',
|
||||
'0',
|
||||
't',
|
||||
'f',
|
||||
'2026-03-12 12:00:00.00000',
|
||||
'FASS.Mvc',
|
||||
'2026-03-12 12:00:00.00000',
|
||||
'FASS.Mvc',
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE "flow_task_instance"
|
||||
ADD COLUMN "interrupt_mode" varchar(50),
|
||||
ADD COLUMN "interrupt_time" timestamp;
|
||||
@@ -0,0 +1,64 @@
|
||||
BEGIN;
|
||||
|
||||
DO $$
|
||||
DECLARE
|
||||
current_schema_name text := current_schema();
|
||||
unique_constraint_name text;
|
||||
unique_index_name text;
|
||||
BEGIN
|
||||
SELECT tc.constraint_name
|
||||
INTO unique_constraint_name
|
||||
FROM information_schema.table_constraints AS tc
|
||||
JOIN information_schema.constraint_column_usage AS ccu
|
||||
ON ccu.constraint_schema = tc.constraint_schema
|
||||
AND ccu.constraint_name = tc.constraint_name
|
||||
WHERE tc.table_schema = current_schema_name
|
||||
AND tc.table_name = 'flow_task_instance'
|
||||
AND tc.constraint_type = 'UNIQUE'
|
||||
AND ccu.column_name = 'append_id'
|
||||
ORDER BY tc.constraint_name
|
||||
LIMIT 1;
|
||||
|
||||
IF unique_constraint_name IS NOT NULL THEN
|
||||
EXECUTE format(
|
||||
'ALTER TABLE %I.%I DROP CONSTRAINT %I',
|
||||
current_schema_name,
|
||||
'flow_task_instance',
|
||||
unique_constraint_name);
|
||||
END IF;
|
||||
|
||||
SELECT indexname
|
||||
INTO unique_index_name
|
||||
FROM pg_indexes
|
||||
WHERE schemaname = current_schema_name
|
||||
AND tablename = 'flow_task_instance'
|
||||
AND indexname = 'IX_flow_task_instance_append_id'
|
||||
AND indexdef LIKE '%UNIQUE INDEX%'
|
||||
LIMIT 1;
|
||||
|
||||
IF unique_index_name IS NOT NULL THEN
|
||||
EXECUTE format(
|
||||
'DROP INDEX IF EXISTS %I.%I',
|
||||
current_schema_name,
|
||||
unique_index_name);
|
||||
END IF;
|
||||
|
||||
IF NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM pg_indexes
|
||||
WHERE schemaname = current_schema_name
|
||||
AND tablename = 'flow_task_instance'
|
||||
AND indexname = 'IX_flow_task_instance_append_id'
|
||||
) THEN
|
||||
EXECUTE format(
|
||||
'CREATE INDEX %I ON %I.%I (%I)',
|
||||
'IX_flow_task_instance_append_id',
|
||||
current_schema_name,
|
||||
'flow_task_instance',
|
||||
'append_id');
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
COMMIT;
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
ALTER TABLE public.flow_task_instance
|
||||
ADD COLUMN IF NOT EXISTS task_template_code varchar(100),
|
||||
ADD COLUMN IF NOT EXISTS is_loop bool NOT NULL DEFAULT false;
|
||||
|
||||
UPDATE public.flow_task_instance AS ti
|
||||
SET
|
||||
task_template_code = tt.code,
|
||||
is_loop = COALESCE(tt.is_loop, false)
|
||||
FROM public.flow_task_template AS tt
|
||||
WHERE ti.task_template_id = tt.id
|
||||
AND (
|
||||
ti.task_template_code IS DISTINCT FROM tt.code
|
||||
OR ti.is_loop IS DISTINCT FROM COALESCE(tt.is_loop, false)
|
||||
);
|
||||
|
||||
UPDATE public.flow_task_instance
|
||||
SET task_template_code = COALESCE(task_template_code, task_template_id)
|
||||
WHERE task_template_code IS NULL;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS ix_flow_task_instance_task_template_code
|
||||
ON public.flow_task_instance (task_template_code);
|
||||
@@ -0,0 +1,115 @@
|
||||
CREATE TABLE
|
||||
"record_message" (
|
||||
"id" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
|
||||
"type" varchar(50) COLLATE "pg_catalog"."default",
|
||||
"text" varchar(1000) COLLATE "pg_catalog"."default",
|
||||
"data" text COLLATE "pg_catalog"."default",
|
||||
"sort_number" float8 NOT NULL,
|
||||
"is_enable" bool NOT NULL,
|
||||
"is_delete" bool NOT NULL,
|
||||
"create_at" timestamp(6) NOT NULL,
|
||||
"create_by" varchar(50) COLLATE "pg_catalog"."default",
|
||||
"update_at" timestamp(6) NOT NULL,
|
||||
"update_by" varchar(50) COLLATE "pg_catalog"."default",
|
||||
"remark" text COLLATE "pg_catalog"."default",
|
||||
"extend" text COLLATE "pg_catalog"."default"
|
||||
);
|
||||
|
||||
CREATE INDEX "IX_record_message_create_at" ON "record_message" USING btree (
|
||||
"create_at" "pg_catalog"."timestamp_ops" ASC NULLS LAST
|
||||
);
|
||||
|
||||
CREATE INDEX "IX_record_message_sort_number" ON "record_message" USING btree (
|
||||
"sort_number" "pg_catalog"."float8_ops" ASC NULLS LAST
|
||||
);
|
||||
|
||||
CREATE INDEX "IX_record_message_type" ON "record_message" USING btree (
|
||||
"type" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
|
||||
);
|
||||
|
||||
CREATE INDEX "IX_record_message_update_at" ON "record_message" USING btree (
|
||||
"update_at" "pg_catalog"."timestamp_ops" ASC NULLS LAST
|
||||
);
|
||||
|
||||
ALTER TABLE "record_message" ADD CONSTRAINT "PK_record_message" PRIMARY KEY ("id");
|
||||
|
||||
INSERT INTO
|
||||
"account_permission" (
|
||||
"id",
|
||||
"parent_id",
|
||||
"type",
|
||||
"code",
|
||||
"name",
|
||||
"icon",
|
||||
"method",
|
||||
"target",
|
||||
"address",
|
||||
"sort_number",
|
||||
"is_enable",
|
||||
"is_delete",
|
||||
"create_at",
|
||||
"create_by",
|
||||
"update_at",
|
||||
"update_by",
|
||||
"remark",
|
||||
"extend"
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
gen_random_uuid (),
|
||||
(
|
||||
SELECT
|
||||
"id"
|
||||
FROM
|
||||
"account_permission"
|
||||
WHERE
|
||||
"code" = 'Record'
|
||||
),
|
||||
'Menu',
|
||||
'RecordMessage',
|
||||
'消息记录',
|
||||
'fa-fw fa-solid fa-caret-right',
|
||||
'Get',
|
||||
'/Record/Message/Index',
|
||||
NULL,
|
||||
'3',
|
||||
't',
|
||||
'f',
|
||||
'2026-05-07 22:03:19.685512',
|
||||
'FASS.Mvc',
|
||||
'2026-05-07 22:03:19.685512',
|
||||
'FASS.Mvc',
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
INSERT INTO
|
||||
"frame_config" (
|
||||
"id",
|
||||
"key",
|
||||
"value",
|
||||
"sort_number",
|
||||
"is_enable",
|
||||
"is_delete",
|
||||
"create_at",
|
||||
"create_by",
|
||||
"update_at",
|
||||
"update_by",
|
||||
"remark",
|
||||
"extend"
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
gen_random_uuid (),
|
||||
'MessageDayLimit',
|
||||
'10',
|
||||
'0',
|
||||
't',
|
||||
'f',
|
||||
'2026-05-07 22:03:19.685512',
|
||||
'FASS.Mvc',
|
||||
'2026-05-07 22:03:19.685512',
|
||||
'FASS.Mvc',
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE "flow_task_instance"
|
||||
ADD COLUMN "recovery" text;
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE "flow_task_template" ALTER COLUMN "car_type_Id" DROP NOT NULL;
|
||||
Reference in New Issue
Block a user