mirror of https://github.com/Revertron/Alfis
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
676 B
SQL
27 lines
676 B
SQL
CREATE TABLE blocks (
|
|
'id' BIGINT NOT NULL PRIMARY KEY,
|
|
'timestamp' BIGINT NOT NULL,
|
|
'version' INT,
|
|
'difficulty' INTEGER,
|
|
'random' INTEGER,
|
|
'nonce' INTEGER,
|
|
'transaction' TEXT,
|
|
'prev_block_hash' BINARY,
|
|
'hash' BINARY,
|
|
'pub_key' BINARY,
|
|
'signature' BINARY
|
|
);
|
|
CREATE INDEX block_index ON blocks (id);
|
|
CREATE INDEX keys ON blocks (pub_key);
|
|
|
|
CREATE TABLE domains (
|
|
'id' BIGINT NOT NULL PRIMARY KEY,
|
|
'timestamp' BIGINT NOT NULL,
|
|
'identity' BINARY,
|
|
'confirmation' BINARY,
|
|
'data' TEXT,
|
|
'owner' BINARY
|
|
);
|
|
CREATE INDEX ids ON domains ('identity');
|
|
|
|
CREATE TABLE options ('name' TEXT NOT NULL, 'value' TEXT NOT NULL); |