You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE "Album" (
"AlbumId" int NOT NULL,
"Title" varchar(160) NOT NULL,
"ArtistId" int NOT NULL,
CONSTRAINT PK_Album PRIMARY KEY ( "AlbumId" )
);
In the deparsed query, double quotes around PK_Album are removed. I am not sure if this makes the queries different but since the fingerprint changed, I raised this issue.
This is also true for "ALTER TABLE". Please let me know if I should open a separate issue for that.
To reproduce:
const fs = require('fs')
const { parse, deparse } = require('pgsql-parser');
async function main() {
const stmts = parse(`
CREATE TABLE "Album"
(
"AlbumId" INT NOT NULL,
"Title" VARCHAR(160) NOT NULL,
"ArtistId" INT NOT NULL,
CONSTRAINT "PK_Album" PRIMARY KEY ("AlbumId")
)
`)
const stmts2 = deparse(stmts[0])
console.log(stmts2)
}
main()
Original query (with fingerprint 91291afafdacd92a):
Deparsed query (with fingerprint d37da9dd17c1175d):
In the deparsed query, double quotes around PK_Album are removed. I am not sure if this makes the queries different but since the fingerprint changed, I raised this issue.
This is also true for "ALTER TABLE". Please let me know if I should open a separate issue for that.
To reproduce:
Schema at https://github.com/prisma/database-schema-examples/tree/main/postgres/chinook
The text was updated successfully, but these errors were encountered: