-
Couldn't load subscription status.
- Fork 0
Open
Description
Problem
When creating a cohort database from a prototype on a different DBMS type (e.g., SQL Server → MySQL or PostgreSQL), the operation fails with collation errors.
Current Behavior
The code in CreateNewCohortDatabaseWizard.cs (lines 116-132) attempts to preserve collation from source columns, but:
- DBMS-specific collation names (e.g.,
Latin1_General_CI_ASon SQL Server vslatin1_swedish_cion MySQL) are not compatible across systems - No translation or fallback logic exists for cross-DBMS scenarios
- Results in errors like "collation 'latin1_swedish_ci' not found" when crossing DBMS boundaries
Expected Behavior
When target database DBMS differs from source column DBMS:
- Either set
Collation = nullto use target database defaults - Or implement collation name translation between DBMS types
Related Files
Rdmp.Core/CohortCommitting/CreateNewCohortDatabaseWizard.cs:116-132Rdmp.Core/Curation/Data/ColumnInfo.cs(Collation property)
Upstream Reference
Originally reported in HicServices/RDMP#1093 (marked high priority)
Suggested Fix
Add DBMS type check before applying collation:
// Only use collation if source and target are same DBMS type
var sourceDbms = e.ColumnInfo?.TableInfo?.Server?.DatabaseType;
var targetDbms = _targetDatabase.Server.DatabaseType;
Collation = (collations.Length == 1 && sourceDbms == targetDbms) ? collations[0] : nullMetadata
Metadata
Assignees
Labels
No labels