From 7080c0a74f1c8e6ce7f331dbb6c8bd08f82902e1 Mon Sep 17 00:00:00 2001 From: Taka Goto Date: Thu, 4 Oct 2018 13:56:44 -0500 Subject: [PATCH] migration to update columns --- db/migrations/1538670026_blah.down.sql | 11 +++++++++++ db/migrations/1538670026_blah.up.sql | 7 +++++++ db/schema.sql | 12 ++++++------ 3 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 db/migrations/1538670026_blah.down.sql create mode 100644 db/migrations/1538670026_blah.up.sql diff --git a/db/migrations/1538670026_blah.down.sql b/db/migrations/1538670026_blah.down.sql new file mode 100644 index 00000000..a262a6a8 --- /dev/null +++ b/db/migrations/1538670026_blah.down.sql @@ -0,0 +1,11 @@ +ALTER TABLE maker.bite + MODIFY ilk bytea; + +ALTER TABLE maker.bite + MODIFY urn bytea; + +ALTER TABLE maker.frob + MODIFY ilk bytea; + +ALTER TABLE maker.frob + MODIFY urn bytea; diff --git a/db/migrations/1538670026_blah.up.sql b/db/migrations/1538670026_blah.up.sql new file mode 100644 index 00000000..730241d9 --- /dev/null +++ b/db/migrations/1538670026_blah.up.sql @@ -0,0 +1,7 @@ +ALTER TABLE maker.bite + ALTER COLUMN ilk SET DATA TYPE text, + ALTER COLUMN urn SET DATA TYPE text; + +ALTER TABLE maker.frob + ALTER COLUMN ilk SET DATA TYPE text, + ALTER COLUMN urn SET DATA TYPE text; diff --git a/db/schema.sql b/db/schema.sql index 7e5ac73f..0081a856 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 10.3 --- Dumped by pg_dump version 10.3 +-- Dumped from database version 10.4 +-- Dumped by pg_dump version 10.4 SET statement_timeout = 0; SET lock_timeout = 0; @@ -64,8 +64,8 @@ SET default_with_oids = false; CREATE TABLE maker.bite ( id integer NOT NULL, header_id integer NOT NULL, - ilk bytea, - urn bytea, + ilk text, + urn text, ink character varying, art character varying, iart character varying, @@ -490,8 +490,8 @@ ALTER SEQUENCE maker.flop_kick_id_seq OWNED BY maker.flop_kick.id; CREATE TABLE maker.frob ( id integer NOT NULL, header_id integer NOT NULL, - ilk bytea, - urn bytea, + ilk text, + urn text, dink numeric, dart numeric, ink numeric,