Skip to content

Commit 03d7105

Browse files
committed
Changed the datatype for 'episode' in 'appears_in' from INTEGER to SMALLINT, as this causes problems with Postgres and deserialization
1 parent de1ac77 commit 03d7105

File tree

2 files changed

+2
-2
lines changed
  • wundergraph_example/migrations
    • pg/2018-01-24-131925_setup
    • sqlite/2018-01-24-131925_setup

2 files changed

+2
-2
lines changed

wundergraph_example/migrations/pg/2018-01-24-131925_setup/up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CREATE TABLE heros(
2020

2121
CREATE TABLE appears_in(
2222
hero_id INTEGER NOT NULL REFERENCES heros(id) ON DELETE CASCADE ON UPDATE RESTRICT,
23-
episode INTEGER NOT NULL CHECK(episode IN (1,2,3)),
23+
episode SMALLINT NOT NULL CHECK(episode IN (1,2,3)),
2424
PRIMARY KEY(hero_id, episode)
2525
);
2626

wundergraph_example/migrations/sqlite/2018-01-24-131925_setup/up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CREATE TABLE heros(
2020

2121
CREATE TABLE appears_in(
2222
hero_id INTEGER NOT NULL REFERENCES heros(id) ON DELETE CASCADE ON UPDATE RESTRICT,
23-
episode INTEGER NOT NULL CHECK(episode IN (1,2,3)),
23+
episode SMALLINT NOT NULL CHECK(episode IN (1,2,3)),
2424
PRIMARY KEY(hero_id, episode)
2525
);
2626

0 commit comments

Comments
 (0)