Newer
Older
pokemon-go-trade / migration / 1_initial.sql
Simon Lindgren on 21 Feb 2021 485 bytes Added have to db
-- +migrate Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE pokemon (
   id INT PRIMARY KEY,
   dex_number INT,
   region varchar(200),
   name VARCHAR(200),
   shiny_enabled boolean,
   shiny_image_name VARCHAR(200),
   image_name VARCHAR(200)
);

CREATE TABLE have_pokemon (
     id SERIAL PRIMARY KEY,
     pokemon_id INT,
     shiny bool
);

-- +migrate Down
-- SQL section 'Down' is executed when this migration is rolled back
DROP TABLE pokemon;