Update sync script, add DDL dump and SQL fix script for replication

This commit is contained in:
tigerenwork 2026-06-19 00:29:22 +08:00
parent 0dab6d4ca1
commit 0e68676369
3 changed files with 4170 additions and 2 deletions

4161
ddl_autoflowdemo.sql Normal file

File diff suppressed because it is too large Load Diff

7
fix_errors.sql Normal file
View File

@ -0,0 +1,7 @@
-- 1. Drop foreign key constraints that prevent data insertion since the parent 'users' table is not part of the replication
ALTER TABLE `demo`.`crm_sales_visit_records` DROP FOREIGN KEY `fk_recorder_id`;
ALTER TABLE `demo`.`user_profiles` DROP FOREIGN KEY `fk_1`;
-- 2. Drop the generated column 'biz_key' in 'crm_acv_targets' and recreate it as a standard VARCHAR column so Sling can import data into it
ALTER TABLE `demo`.`crm_acv_targets` DROP COLUMN `biz_key`;
ALTER TABLE `demo`.`crm_acv_targets` ADD COLUMN `biz_key` VARCHAR(16) NULL COMMENT '业务主键如FY26Q1全年为FY26';

View File

@ -1,6 +1,6 @@
sling run -r sync_aptselldemo.yaml
sling run -r sync_aptselldemo_homelab.yaml
sling run -r sync_demo_local.yaml
sling run -r sync_demo.yaml
sling run -r sync_demo_homelab.yaml