Primary Key and Schema Change Failures
Error
Deployment fails when attempting to change primary keys, column data types, or other schema elements. Snowflake and some other data platforms restrict or disallow certain schema changes (for example, altering column types or dropping primary key constraints) through standard DDL.
Possible Causes
- Primary key changes: Adding, removing, or modifying primary key constraints may not be supported in the same way across platforms.
- Column data type changes: Altering column types (for example, VARCHAR to NUMBER) can require special handling or may be blocked.
- Platform-specific DDL limits: Each data platform has its own rules for schema evolution.
Possible Solutions
- Make changes off-platform: For column data type changes, consider making the change directly in your data platform (for example, using
ALTER TABLEin Snowflake), then sync metadata in Coalesce so it reflects the new structure. - Recreate the object: In some cases, dropping and re-creating the table or view with the new schema may be necessary. Ensure you have a backup or can re-create data before doing this.
- Check platform documentation: Review your data platform's documentation for supported schema change operations and any workarounds.