Open
Description
Description
When using pgloader
to perform a data-only migration from Microsoft SQL Server to PostgreSQL, and specifying a column naming convention such as snake_case
, an additional underscore is incorrectly added to column names that already contain underscores.
Steps to Reproduce
- In SQL Server, have a table with a column named
Column_Name
. - Use
pgloader
withdata only
migration enabled and withsnake_case
name transformation. - Observe that pgloader attempts to write to a column named
column__name
(with a double underscore) instead of the correctcolumn_name
.
Expected Behavior
pgloader
should map the column as it is from sql server to psql without adding an underscore if it has one.
Actual Behavior
pgloader
transforms Column_Name
into column__name
, inserting an additional underscore, which causes a mismatch with the actual column names in the PostgreSQL schema and results in a migration failure.
Additional Notes
- This issue only occurs during data-only migration when the PostgreSQL schema is pre-created.
- The error does not occur when
pgloader
is allowed to create the schema (as it then matches its own column naming logic).
Wasn't able to find any command in the docs that handles this part.
Metadata
Metadata
Assignees
Labels
No labels