1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
-- =============================================================================
|
||||
-- etl_feiqiu / ods(原始数据层)
|
||||
-- 生成日期:2026-02-27
|
||||
-- 生成日期:2026-03-15
|
||||
-- 来源:测试库(通过脚本自动导出)
|
||||
-- =============================================================================
|
||||
|
||||
@@ -193,12 +193,37 @@ 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,
|
||||
fetched_at timestamp with time zone DEFAULT now(),
|
||||
payload jsonb NOT NULL
|
||||
payload jsonb NOT NULL,
|
||||
siteid bigint
|
||||
);
|
||||
|
||||
CREATE TABLE ods.group_buy_package_details (
|
||||
coupon_id bigint NOT NULL,
|
||||
package_name text,
|
||||
duration integer,
|
||||
start_time timestamp with time zone,
|
||||
end_time timestamp with time zone,
|
||||
add_start_clock text,
|
||||
add_end_clock text,
|
||||
is_enabled integer,
|
||||
is_delete integer,
|
||||
site_id bigint,
|
||||
tenant_id bigint,
|
||||
create_time timestamp with time zone,
|
||||
creator_name text,
|
||||
table_area_ids jsonb,
|
||||
table_area_names jsonb,
|
||||
assistant_services jsonb,
|
||||
groupon_site_infos jsonb,
|
||||
package_services jsonb,
|
||||
coupon_details_list jsonb,
|
||||
content_hash text,
|
||||
payload jsonb,
|
||||
fetched_at timestamp with time zone DEFAULT now()
|
||||
);
|
||||
|
||||
CREATE TABLE ods.group_buy_packages (
|
||||
@@ -1048,6 +1073,7 @@ ALTER TABLE ods.assistant_accounts_master ADD CONSTRAINT assistant_accounts_mast
|
||||
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);
|
||||
ALTER TABLE ods.group_buy_package_details ADD CONSTRAINT pk_group_buy_package_details PRIMARY KEY (coupon_id);
|
||||
ALTER TABLE ods.group_buy_packages ADD CONSTRAINT group_buy_packages_pkey PRIMARY KEY (id, content_hash);
|
||||
ALTER TABLE ods.group_buy_redemption_records ADD CONSTRAINT group_buy_redemption_records_pkey PRIMARY KEY (id, content_hash);
|
||||
ALTER TABLE ods.member_balance_changes ADD CONSTRAINT member_balance_changes_pkey PRIMARY KEY (id, content_hash);
|
||||
|
||||
Reference in New Issue
Block a user