微信小程序页面迁移校验之前 P5任务处理之前
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
-- =============================================================================
|
||||
-- etl_feiqiu / ods(原始数据层)
|
||||
-- 生成日期:2026-02-25
|
||||
-- 生成日期:2026-02-27
|
||||
-- 来源:测试库(通过脚本自动导出)
|
||||
-- =============================================================================
|
||||
|
||||
@@ -77,28 +77,6 @@ CREATE TABLE ods.assistant_accounts_master (
|
||||
payload jsonb NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE ods.assistant_cancellation_records (
|
||||
id bigint NOT NULL,
|
||||
siteid bigint,
|
||||
siteprofile jsonb,
|
||||
assistantname text,
|
||||
assistantabolishamount numeric(18,2),
|
||||
assistanton integer,
|
||||
pdchargeminutes integer,
|
||||
tableareaid bigint,
|
||||
tablearea text,
|
||||
tableid bigint,
|
||||
tablename text,
|
||||
trashreason text,
|
||||
createtime timestamp without time zone,
|
||||
tenant_id bigint,
|
||||
content_hash text NOT NULL,
|
||||
source_file text,
|
||||
source_endpoint text,
|
||||
fetched_at timestamp with time zone DEFAULT now(),
|
||||
payload jsonb NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE ods.assistant_service_records (
|
||||
id bigint NOT NULL,
|
||||
tenant_id bigint,
|
||||
@@ -215,6 +193,7 @@ CREATE TABLE ods.goods_stock_summary (
|
||||
rangesalemoney numeric(18,2),
|
||||
rangeinventory numeric(18,4),
|
||||
currentstock numeric(18,4),
|
||||
siteid bigint,
|
||||
content_hash text NOT NULL,
|
||||
source_file text,
|
||||
source_endpoint text,
|
||||
@@ -1066,7 +1045,6 @@ CREATE TABLE ods.tenant_goods_master (
|
||||
|
||||
-- 约束(主键 / 唯一 / 外键)
|
||||
ALTER TABLE ods.assistant_accounts_master ADD CONSTRAINT assistant_accounts_master_pkey PRIMARY KEY (id, content_hash);
|
||||
ALTER TABLE ods.assistant_cancellation_records ADD CONSTRAINT assistant_cancellation_records_pkey PRIMARY KEY (id, content_hash);
|
||||
ALTER TABLE ods.assistant_service_records ADD CONSTRAINT assistant_service_records_pkey PRIMARY KEY (id, content_hash);
|
||||
ALTER TABLE ods.goods_stock_movements ADD CONSTRAINT goods_stock_movements_pkey PRIMARY KEY (sitegoodsstockid, content_hash);
|
||||
ALTER TABLE ods.goods_stock_summary ADD CONSTRAINT goods_stock_summary_pkey PRIMARY KEY (sitegoodsid, content_hash);
|
||||
@@ -1091,8 +1069,6 @@ ALTER TABLE ods.tenant_goods_master ADD CONSTRAINT tenant_goods_master_pkey PRIM
|
||||
-- 索引
|
||||
CREATE INDEX idx_assistant_accounts_master_fetched_at_fetched_at ON ods.assistant_accounts_master USING btree (fetched_at);
|
||||
CREATE INDEX idx_assistant_accounts_master_fetched_pk_d986993f ON ods.assistant_accounts_master USING btree (fetched_at, id, content_hash);
|
||||
CREATE INDEX idx_assistant_cancellation_records_fetched_at_fetched_at ON ods.assistant_cancellation_records USING btree (fetched_at);
|
||||
CREATE INDEX idx_assistant_cancellation_records_fetched_pk_258b411c ON ods.assistant_cancellation_records USING btree (fetched_at, id, content_hash);
|
||||
CREATE INDEX idx_assistant_service_records_fetched_at_fetched_at ON ods.assistant_service_records USING btree (fetched_at);
|
||||
CREATE INDEX idx_assistant_service_records_fetched_pk_e200787c ON ods.assistant_service_records USING btree (fetched_at, id, content_hash);
|
||||
CREATE INDEX idx_goods_stock_movements_fetched_at_fetched_at ON ods.goods_stock_movements USING btree (fetched_at);
|
||||
|
||||
Reference in New Issue
Block a user