ipld-eth-server/db/migrations/00005_create_nodes_table.sql
Rob Mulholand d9e2bece27 Consolidate migrations
- Facilitate modifying migrations without cascading consequences for
  later migrations updating the same tables
2019-03-23 10:57:39 -05:00

13 lines
281 B
SQL

-- +goose Up
CREATE TABLE nodes (
id SERIAL PRIMARY KEY,
client_name VARCHAR,
genesis_block VARCHAR(66),
network_id NUMERIC,
node_id VARCHAR(128),
CONSTRAINT node_uc UNIQUE (genesis_block, network_id, node_id)
);
-- +goose Down
DROP TABLE nodes;