Skip to content

feat: Improve invalid type error during migration #8436

@erezrokah

Description

@erezrokah

When PostgresSQL destination migrates the DB, we read the current schema and try to convert the column types to types used by CloudQuery. If a user changes the column types for some reason (e.g. use another tool like Prisma to read and re-apply the schema), the migration fails with a hard to understand error:

We should:

  • Provide a better error. Example "failed to convert Postgres column type <type> to a supported CloudQuery type. Supported types are <list-of-supported-types>. Hint: Drop and add the table x to solve the issue."
  • Consider supporting more types (for example also int, etc.). Add a warning if the type is unexpected.
  • If running on forced mode and we can't read the schema, we can drop and add the table automatically

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions