修改问题

这个提交包含在:
apple
2026-12-01 10:12:31 +08:00
父节点 c5760c74eb
当前提交 4d8c05e765
共修改 251 个文件,包含 26355 行新增和 279 行删除
+16
查看文件
@@ -974,6 +974,10 @@ migrations:
ownerUnit: system
path: db/migration/system/V20261013.247__register_file_preview_permission.sql
sha256: d2adc148063440bdc7c03484661c13dabf80e902cd88e15fa306330540816b8b
- version: '20261013.248'
ownerUnit: governance
path: db/migration/governance/V20261013.248__semantic_classification_candidates.sql
sha256: 889cdd62de9c6cefd0ab0c40beb515987a1f2114b38e255ee0d3549d81b63084
- version: '20261021.248'
ownerUnit: dataops
path: db/migration/dataops/V20261021.248__create_schedule_canvas_layout.sql
@@ -1086,3 +1090,15 @@ migrations:
ownerUnit: system
path: db/migration/system/V20261124.278__register_regulatory_reporting.sql
sha256: f1a7729b7f5a082442c967e125a83c7193b6c921003679222db3d504bfed0f05
- version: '20261130.279'
ownerUnit: integration
path: db/migration/integration/V20261130.279__create_reporting_template_structure.sql
sha256: f2ed95dd1e5442a8a7cfc4f9af913ce84dc4e5b5ed3c0479ff1fa9ed9bbb70ae
- version: '20261130.280'
ownerUnit: integration
path: db/migration/integration/V20261130.280__create_reporting_plans.sql
sha256: e893839487847168c55a6c38fe84ba9c9dbbb19e0133a07e53711f2a8e56ae67
- version: '20261130.281'
ownerUnit: integration
path: db/migration/integration/V20261130.281__create_reporting_execution.sql
sha256: 0f4552ba031b2696c13627f37aef5857ff4d92711fcf0eb4e3f8c77e32080720
@@ -0,0 +1,8 @@
-- Additive metadata only. Existing template fields_json stays an ordered string array.
CREATE TABLE dg_reporting_template_structure (
organization_id BIGINT NOT NULL,
template_id VARCHAR(36) NOT NULL,
structure_json LONGTEXT NOT NULL,
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
PRIMARY KEY (organization_id,template_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
@@ -0,0 +1,43 @@
-- Reusable draft plans. Fixed references and per-resource mappings; no production data seeded.
CREATE TABLE dg_reporting_plan (
organization_id BIGINT NOT NULL,
plan_id VARCHAR(36) NOT NULL,
plan_code VARCHAR(64) NOT NULL,
plan_name VARCHAR(160) NOT NULL,
version_label VARCHAR(64) NOT NULL,
regulator_id VARCHAR(36) NOT NULL,
system_id VARCHAR(36) NOT NULL,
topic_id VARCHAR(36) NOT NULL,
standard_id VARCHAR(36) NOT NULL,
standard_version BIGINT NOT NULL,
adapter_profile VARCHAR(40) NOT NULL,
description VARCHAR(2000) NULL,
plan_state VARCHAR(16) NOT NULL,
version BIGINT NOT NULL DEFAULT 0,
command_sha256 CHAR(64) NOT NULL,
create_by BIGINT NOT NULL,
update_by BIGINT NOT NULL,
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
update_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
PRIMARY KEY (organization_id,plan_id),
UNIQUE KEY uk_reporting_plan_version (organization_id,plan_code,version_label),
KEY idx_reporting_plan_standard (organization_id,standard_id),
CONSTRAINT ck_reporting_plan_version CHECK (version>=0 AND standard_version>=0),
CONSTRAINT ck_reporting_plan_state CHECK (plan_state IN ('DRAFT','FROZEN','DISABLED')),
CONSTRAINT ck_reporting_plan_profile CHECK (adapter_profile IN ('SASAC_SCIENCE_B','SASAC_TREASURY_B'))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
CREATE TABLE dg_reporting_plan_resource (
organization_id BIGINT NOT NULL,
plan_id VARCHAR(36) NOT NULL,
resource_code VARCHAR(128) NOT NULL,
dataset_id VARCHAR(20) NOT NULL,
dataset_version BIGINT NOT NULL,
release_id VARCHAR(20) NOT NULL,
schema_version_id VARCHAR(20) NOT NULL,
schema_sha256 CHAR(64) NOT NULL,
mapping_json LONGTEXT NOT NULL,
PRIMARY KEY (organization_id,plan_id,resource_code),
CONSTRAINT fk_reporting_plan_resource FOREIGN KEY (organization_id,plan_id) REFERENCES dg_reporting_plan(organization_id,plan_id),
CONSTRAINT ck_reporting_plan_dataset_ver CHECK (dataset_version>=0)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
@@ -0,0 +1,64 @@
-- Reporting tasks, immutable batch definitions and private file references. No source rows in transaction tables.
CREATE TABLE dg_reporting_task (
organization_id BIGINT NOT NULL,
task_id VARCHAR(36) NOT NULL,
task_name VARCHAR(160) NOT NULL,
plan_id VARCHAR(36) NOT NULL,
plan_version BIGINT NOT NULL,
definition_json LONGTEXT NOT NULL,
enabled TINYINT NOT NULL DEFAULT 1,
version BIGINT NOT NULL DEFAULT 0,
command_sha256 CHAR(64) NOT NULL,
create_by BIGINT NOT NULL,
update_by BIGINT NOT NULL,
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
update_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
PRIMARY KEY (organization_id,task_id),
CONSTRAINT fk_reporting_task_plan FOREIGN KEY (organization_id,plan_id) REFERENCES dg_reporting_plan(organization_id,plan_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
CREATE TABLE dg_reporting_batch (
organization_id BIGINT NOT NULL,
batch_id VARCHAR(36) NOT NULL,
task_id VARCHAR(36) NOT NULL,
task_version BIGINT NOT NULL,
version BIGINT NOT NULL DEFAULT 0,
batch_state VARCHAR(32) NOT NULL,
start_date VARCHAR(10) NOT NULL,
end_date VARCHAR(10) NOT NULL,
frozen_json LONGTEXT NOT NULL,
frozen_sha256 CHAR(64) NOT NULL,
issue_json LONGTEXT NOT NULL,
row_count INT NOT NULL DEFAULT 0,
blocking_count INT NOT NULL DEFAULT 0,
warning_count INT NOT NULL DEFAULT 0,
snapshot_id VARCHAR(36) NULL,
package_id VARCHAR(36) NULL,
message VARCHAR(1000) NULL,
create_sha256 CHAR(64) NOT NULL,
command_sha256 CHAR(64) NOT NULL,
create_by BIGINT NOT NULL,
update_by BIGINT NOT NULL,
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
update_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
PRIMARY KEY (organization_id,batch_id),
KEY idx_reporting_batch_task (organization_id,task_id,create_time),
CONSTRAINT fk_reporting_batch_task FOREIGN KEY (organization_id,task_id) REFERENCES dg_reporting_task(organization_id,task_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
CREATE TABLE dg_reporting_artifact (
organization_id BIGINT NOT NULL,
artifact_id VARCHAR(36) NOT NULL,
batch_id VARCHAR(36) NOT NULL,
artifact_kind VARCHAR(32) NOT NULL,
target_json LONGTEXT NOT NULL,
binding_json LONGTEXT NULL,
proof_json LONGTEXT NOT NULL,
operation_key CHAR(64) NOT NULL,
artifact_state VARCHAR(16) NOT NULL,
create_by BIGINT NOT NULL,
create_time DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
PRIMARY KEY (organization_id,artifact_id),
UNIQUE KEY uk_reporting_artifact_operation (operation_key),
CONSTRAINT fk_reporting_artifact_batch FOREIGN KEY (organization_id,batch_id) REFERENCES dg_reporting_batch(organization_id,batch_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;