I have this error in my migration script
Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: Migration V1_0_1__initial_schema.sql failed
-------------------------------------------
SQL State : 42601
Error Code : 0
Message : ERROR: syntax error at or near "("
Position: 458
Location : db/migration/V1_0_1__initial_schema.sql (/root/server/build/resources/main/db/migration/V1_0_1__initial_schema.sql)
Line : 50
Statement : create table xxxxx /* (this is line 50) */
(
id bigserial not null primary key,
name text not null,
created timestamptz default now() not null,
xxxxx_id uuid not null references xxxxx,
xxxxxx_xx_xxxx uuid not null,
owner_id bigint not null references "xxxx",
document text generated always as ( id::text || ' ' || name ) stored,
xxxxxx_id bigint references xxxxxx
)
but the syntax for the script is fine - works fine locally. Both my local and server machines have postgresql 13 installed
server
# psql --version
psql (PostgreSQL) 13.4 (Debian 13.4-4.pgdg100+1)
local
$ "C:\Program Files\PostgreSQL\13\bin\psql.exe" --version
psql (PostgreSQL) 13.2