Commit 8e1485a
authored
Fix: Migrations are not Postgres compatible
With length field for "age" column, the resultant SQL is
CREATE TABLE "pet" ("id" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "age" int(11) NOT NULL, "user_id" varchar(255), CONSTRAINT "PK_b1ac2e88e89b9480e0c5b53fa60" PRIMARY KEY ("id"))
This will fail in postgres due to [int(11) being non standard](https://www.postgresql.org/message-id/18103.1013471731%40sss.pgh.pa.us)
By removing "length" property, the resultant sql uses 'age int NOT NULL', which works in postgres and mysql both ( I have also verified it for oracle)1 parent 98a342e commit 8e1485a
1 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
0 commit comments