0
À l'étude

DDL Import | Import SQL failing on gen_random_uuid() and timezone('utc'::text, now())

Bryan Lam il y a 12 mois mis à jour par Jarosław Błąd (CEO) il y a 12 mois 1

The import SQL parser seems to not like `gen_random_uuid()`(supported in Postgres 13) when that is set as the default. It is also failing to parse`timezone('utc'::text, now())`(supported in Postgres 13).

I've been resorting to deleting these from my sql file just so I can get the table to import.

Example:

CREATE TABLE public.skill (
    title character varying NOT NULL,
    description text,
    id uuid DEFAULT gen_random_uuid() NOT NULL,
    created_at timestamp without time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    updated_at timestamp without time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    deleted_at timestamp without time zone
);

To get it to import I have to delete those:

CREATE TABLE public.skill (
    title character varying NOT NULL,
    description text,
    id uuid NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    deleted_at timestamp without time zone
);

Would be nice to have the import accommodate these functions so I don't have to keep editing my sql files before import.

À l'étude

Thank you for reporting the issue. We will investigate this.

Best regards,

Jarosław