ipld-eth-server/db/migrations/20181114200132_create_vow_contract_storage_tables.sql
Rob Mulholand a27aaa7e68 Use timestamps for migrations with numeric indexes
- Reverting the commit that switched away from timestamps did not modify
  migrations created since that change was applied
- Apply timestamps that are incremented by one from previous
2019-02-20 16:01:35 -06:00

83 lines
1.6 KiB
SQL

-- +goose Up
CREATE TABLE maker.vow_vat (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
vat TEXT
);
CREATE TABLE maker.vow_cow (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
cow TEXT
);
CREATE TABLE maker.vow_row (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
row TEXT
);
CREATE TABLE maker.vow_sin (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
sin numeric
);
CREATE TABLE maker.vow_woe (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
woe numeric
);
CREATE TABLE maker.vow_ash (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
ash numeric
);
CREATE TABLE maker.vow_wait (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
wait numeric
);
CREATE TABLE maker.vow_sump (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
sump numeric
);
CREATE TABLE maker.vow_bump (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
bump numeric
);
CREATE TABLE maker.vow_hump (
id SERIAL PRIMARY KEY,
block_number BIGINT,
block_hash TEXT,
hump numeric
);
-- +goose Down
DROP TABLE maker.vow_vat;
DROP TABLE maker.vow_cow;
DROP TABLE maker.vow_row;
DROP TABLE maker.vow_sin;
DROP TABLE maker.vow_woe;
DROP TABLE maker.vow_ash;
DROP TABLE maker.vow_wait;
DROP TABLE maker.vow_sump;
DROP TABLE maker.vow_bump;
DROP TABLE maker.vow_hump;