Skip to content

Commit

Permalink
Adding "currencies" table (#190)
Browse files Browse the repository at this point in the history
* Adding "currencies" table

* Add "network_id" and a unique constraint to the currencies table
  • Loading branch information
Maelkum authored Aug 17, 2022
1 parent 0b9d6b5 commit a905abb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sql/01_tables_graph_database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,15 @@ CREATE TABLE standards_events
event_id UUID NOT NULL REFERENCES events ON DELETE CASCADE,
PRIMARY KEY (standard_id, event_id)
);

CREATE TABLE currencies
(
id UUID PRIMARY KEY,
network_id UUID NOT NULL REFERENCES networks ON DELETE CASCADE,
name TEXT NOT NULL,
symbol VARCHAR(16) NOT NULL,
address VARCHAR(128) NOT NULL,
decimals INTEGER NOT NULL,
endpoint TEXT NOT NULL,
UNIQUE(network_id, address)
);

0 comments on commit a905abb

Please sign in to comment.