-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: db schema to store data fetched from contracts
- Loading branch information
1 parent
71e1a79
commit 8718c46
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
core/store/migrate/migrations/0215_functions_subscriptions.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
CREATE TABLE functions_subscriptions( | ||
subscription_id bigint PRIMARY KEY, | ||
owner_address bytea CHECK (octet_length(owner_address) = 20) NOT NULL, | ||
balance bigint, | ||
blocked_balance bigint, | ||
proposed_owner bytea, | ||
consumers bytea[], | ||
flags bytea | ||
); | ||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP TABLE IF EXISTS functions_subscriptions; | ||
-- +goose StatementEnd |
11 changes: 11 additions & 0 deletions
11
core/store/migrate/migrations/0216_functions_allowlist.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
CREATE TABLE functions_allowlist( | ||
allowed_address bytea CHECK (octet_length(allowed_address) = 20) PRIMARY KEY | ||
); | ||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
DROP TABLE IF EXISTS functions_allowlist; | ||
-- +goose StatementEnd |