DBIx-Class-Migration
DBIx-Class-Migration copied to clipboard
Postgres IDENTITY not recognised
Postgres 10 introduced the syntax: INT GENERATED ALWAYS AS IDENTITY
as a replacement for SERIAL
, but the new syntax is not recognised, and so auto_increment
flag is missing from new identity columns.
This SQL:
CREATE TABLE client_order (
id integer NOT NULL GENERATED ALWAYS AS IDENTITY
);
...gets converted to:
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_nullable => 0 },
);
...but I expected:
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_nullable => 0, auto_increment => 1 },
);