GithubHelp home page GithubHelp logo

Comments (3)

fmasclef avatar fmasclef commented on June 18, 2024

Same issue on character {. Quite the same CREATE statement.

2024-02-28T14:16:45.811995Z ERROR Database error 42601: syntax error at or near "{"
QUERY: CREATE TABLE destination.awesome_table
(
  id                       char(36) not null,
  my_awesome_field           json not null default '_utf8mb4\'{}\''
);
2024-02-28T14:16:45.815995Z FATAL Failed to create the schema, see above.

from pgloader.

Gitii avatar Gitii commented on June 18, 2024

I am also affected.
I worked around this issue by temporally removing the default value and later adding it back (in the destination database).

from pgloader.

alenaobraz avatar alenaobraz commented on June 18, 2024

I have the same issue in my migration:

2024-04-16T13:54:31.640007Z ERROR Database error 42601: syntax error at or near "["
QUERY: CREATE TABLE public.email_template
(
  id               int not null,
  type             varchar(50) not null,
  status           smallint not null,
  version          int not null,
  subject          varchar(250) not null,
  body             text not null,
  created_at       timestamptz not null,
  updated_at       timestamptz not null,
  sender_id        int,
  base_template_id int,
  title            varchar(255),
  settings         json default '_utf8mb4\'[]\''
);
2024-04-16T13:54:31.660007Z FATAL Failed to create the schema, see above.
2024-04-16T13:54:31.668007Z LOG report summary reset
       table name     errors       rows      bytes      total time
-----------------  ---------  ---------  ---------  --------------
  fetch meta data          0       1514                     0.520s
   Create Schemas          0          0                     0.004s
 Create SQL Types          0          0                     0.020s
    Create tables          0          0                     0.000s
-----------------  ---------  ---------  ---------  --------------
-----------------  ---------  ---------  ---------  --------------


Tried to fix it with something like
before load do $$ alter table email_template alter settings set default null; $$
but had no luck

from pgloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.