View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006660 | SymmetricDS | Bug | public | 2024-12-02 17:56 | 2024-12-03 19:12 |
Reporter | elong | Assigned To | |||
Priority | normal | ||||
Status | new | Resolution | open | ||
Product Version | 3.15.0 | ||||
Target Version | 3.15.12 | ||||
Summary | 0006660: Unique index fails to create because it was adjusted to non-unique | ||||
Description | Issue 0006192 attempts to fix a cross-platform data sync issue, but introduces a same-platform DDL bug for unique indexes. When syncing data between a database where a null is used in the index (SQL Server) and a database where null is not used in the index (Oracle), the use of a unique index can cause data sync errors. During a create event, the data loader detects a nullable column with a unique index and adjusts it to be a non-unique index. But this should only be done if the source treats the index differently, which should be possible to detect using the platform-column. For example, when both source and target database are SQL Server, then the index should remain unmodified. When sending schema, the adjustment to the index can cause an error: [DefaultDatabaseWriter] Detected Unique Index: UQ_LeadSource with potential for multiple null values in table: API_LeadSource on column: ProductCode. Adjusting index to be NonUnique. [ModelComparator] Index UQ_LeadSource needs to be removed from table API_LeadSource [ModelComparator] Index UQ_LeadSource needs to be created for table API_LeadSource The operation failed because an index or statistics with name 'UQ_LeadSource' already exists on table 'LeadSource'. | ||||
Tags | ddl/schema | ||||