Files
tasincoandGitHub dd5644e259 Cchain atomic import/export index (#210)
Ortelus will consume the c-chain and will index the atomic import/export tx's.
2020-12-16 10:36:48 -05:00

30 lines
1.0 KiB
SQL

create table `cvm_blocks`
(
block decimal(65) not null primary key,
created_at timestamp not null default current_timestamp
);
create table `cvm_transactions`
(
id varchar(50) not null primary key,
type smallint not null,
blockchain_id varchar(50) not null,
block decimal(65) not null,
created_at timestamp not null default current_timestamp
);
create table `cvm_addresses`
(
id varchar(50) not null primary key,
type smallint not null,
idx int unsigned not null,
transaction_id varchar(50) not null,
address varchar(50) not null,
asset_id varchar(50) not null,
amount bigint unsigned not null default 0,
nonce bigint unsigned not null default 0,
created_at timestamp not null default current_timestamp
);
create index cvm_address_transaction_id ON cvm_addresses (transaction_id);