-
Notifications
You must be signed in to change notification settings - Fork 1
/
create_tables.sql
29 lines (27 loc) · 1.08 KB
/
create_tables.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CREATE TABLE if not exists merkletree (
mid int NOT NULL,
tree_data text(40000) NOT NULL,
blockNumber int NOT NULL,
last_modified_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
created_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE = InnoDB;
CREATE TABLE if not exists contract (
conName char(20) NOT NULL,
conType char(20) NOT NULL,
conAddr text(500) NOT NULL,
owner text(500) NOT NULL,
totalAmount bigint NOT NULL,
shortName char(20) NOT NULL,
last_modified_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
created_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE = InnoDB;
CREATE TABLE if not exists transactions (
traType char(20) NOT NULL,
username char(20) NOT NULL,
vin int NOT NULL,
vout int NOT NULL,
input_notes char(40),
output_specs text(2000),
last_modified_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
created_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
)ENGINE = InnoDB;