add diff field to db constraint

This commit is contained in:
Ian Norden
2020-08-04 22:35:02 -05:00
parent 18299c76e2
commit 77490e8b4b
3 changed files with 6 additions and 6 deletions
@@ -8,7 +8,7 @@ CREATE TABLE eth.state_cids (
state_path BYTEA,
node_type INTEGER,
diff BOOLEAN NOT NULL DEFAULT FALSE,
UNIQUE (header_id, state_path)
UNIQUE (header_id, state_path, diff)
);
-- +goose Down
@@ -8,7 +8,7 @@ CREATE TABLE eth.storage_cids (
storage_path BYTEA,
node_type INTEGER NOT NULL,
diff BOOLEAN NOT NULL DEFAULT FALSE,
UNIQUE (state_id, storage_path)
UNIQUE (state_id, storage_path, diff)
);
-- +goose Down