Skip to content

How to remove MySQL defaults that aren't valid PostgreSQL? #132

@marshallm94

Description

@marshallm94

Is there a way to remove defaults for columns, similar to pgloader's CAST argument?

For example, I have a load file (pgloader's input) that looks like this:

LOAD DATABASE
  FROM mysql://root:XXXXXXXXXXXXXXX@localhost:3306/Stocks
  INTO postgresql://root:XXXXXXXXXXXXXXX@localhost:5432/Stocks

CAST
  type datetime when default 'utc_timestamp()' to "timestamptz default timezone('utc', now())" drop default,
  type float to numeric,
  type bigint when (= precision 20) to bigint drop typemod
;

The second line in the CAST clause could be configured in the data_types_map.json, but is there a way to configure the first line?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions