actually add the files
This commit is contained in:
parent
4ec10e7a98
commit
c685ec41b8
1
.env
Normal file
1
.env
Normal file
@ -0,0 +1 @@
|
||||
DATABASE_URL=mysql://root:dev_web3_proxy@127.0.0.1:3306/web3_proxy
|
5
diesel.toml
Normal file
5
diesel.toml
Normal file
@ -0,0 +1,5 @@
|
||||
# For documentation on how to configure this file,
|
||||
# see diesel.rs/guides/configuring-diesel-cli
|
||||
|
||||
[print_schema]
|
||||
file = "src/schema.rs"
|
5
web3-proxy/diesel.toml
Normal file
5
web3-proxy/diesel.toml
Normal file
@ -0,0 +1,5 @@
|
||||
# For documentation on how to configure this file,
|
||||
# see diesel.rs/guides/configuring-diesel-cli
|
||||
|
||||
[print_schema]
|
||||
file = "src/schema.rs"
|
0
web3-proxy/migrations/.gitkeep
Normal file
0
web3-proxy/migrations/.gitkeep
Normal file
4
web3-proxy/migrations/2022-07-25-234230_first/down.sql
Normal file
4
web3-proxy/migrations/2022-07-25-234230_first/down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE users;
|
||||
DROP TABLE secondary_users;
|
||||
DROP TABLE blocklist;
|
||||
DROP TABLE user_keys;
|
41
web3-proxy/migrations/2022-07-25-234230_first/up.sql
Normal file
41
web3-proxy/migrations/2022-07-25-234230_first/up.sql
Normal file
@ -0,0 +1,41 @@
|
||||
CREATE TABLE users (
|
||||
id SERIAL PRIMARY KEY,
|
||||
primary_address VARCHAR NOT NULL,
|
||||
chain INT NOT NULL,
|
||||
description VARCHAR,
|
||||
email VARCHAR DEFAULT NULL,
|
||||
)
|
||||
|
||||
CREATE TABLE secondary_users (
|
||||
id SERIAL PRIMARY KEY,
|
||||
-- TODO: foreign key
|
||||
user_id INT,
|
||||
-- TODO: how should we store addresses?
|
||||
secondary_address VARCHAR NOT NULL,
|
||||
chain INT NOT NULL,
|
||||
description VARCHAR,
|
||||
-- TODO: creation time?
|
||||
-- TODO: permissions. likely similar to infura
|
||||
)
|
||||
|
||||
CREATE TABLE blocklist (
|
||||
id SERIAL PRIMARY KEY,
|
||||
-- TODO: creation time?
|
||||
blocked_address VARCHAR NOT NULL,
|
||||
chain INT NOT NULL,
|
||||
reason TEXT,
|
||||
)
|
||||
|
||||
CREATE TABLE user_keys (
|
||||
id SERIAL PRIMARY KEY,
|
||||
-- TODO: foreign key
|
||||
user_id BIGINT,
|
||||
api_key VARCHAR,
|
||||
name VARCHAR,
|
||||
private_txs BOOLEAN,
|
||||
active BOOLEAN,
|
||||
-- TODO: creation time?
|
||||
-- TODO: requests_per_second INT,
|
||||
-- TODO: requests_per_day INT,
|
||||
-- TODO: more security features. likely similar to infura
|
||||
)
|
Loading…
Reference in New Issue
Block a user