forked from MohamedLEGH/coco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcore.sql
63 lines (54 loc) · 930 Bytes
/
core.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
create sequence lists_id_seq
;
create sequence next_block_id_seq
;
create table workers
(
address bytea not null
constraint warkers_pkey
primary key,
balance double precision,
shares double precision
)
;
create table shares
(
blob bigint not null,
mined_date bigint not null,
block_id integer not null
)
;
create unique index shares_blob_mined_date_block_id_uindex
on shares (blob, mined_date, block_id)
;
create index shares_block_id_index
on shares (block_id)
;
create table tmp_wallets
(
list_id integer,
wallet_id integer,
balance_change double precision
)
;
create table lists
(
id serial not null,
type integer,
features integer,
block_id integer,
item bytea,
receivers bytea
)
;
create table next_block
(
id serial not null
constraint next_block_pkey
primary key,
block_id integer not null,
data bytea not null,
hash bytea not null,
insert_date timestamp default now() not null
)
;