How convert smallint(1) to smallint with pgloader

I have mysql dump like this

 CREATE TABLE chapters 
(
  id                     char(36) not null,
  name                   varchar(255) not null,
  show_before_start      smallint(1) not null default '0',
  stage_id               char(36),
  "order"                smallint not null default '0',
  created_at             timestamptz,
  updated_at             timestamptz,
  deleted_at             timestamptz
);

and my load file for pgloader looks like

LOAD DATABASE
    FROM mysql://
    INTO postgresql://

WITH
    include drop,
    create tables,
    no truncate,
    create indexes,
    reset sequences,
    foreign keys

CAST
    type smallint to smallint drop typemod,
    type tinyint to smallint,
    type datetime to timestamp

But when I trying to run pgloader I have error ERROR Database error 42601: syntax error at or near "(" QUERY: CREATE TABLE chapters

Where am I wrong?

Upvotes: 1

Views: 40

Answers (0)

Related Questions