2012-01-23 05:03:52 +00:00
|
|
|
create table vda_file (
|
|
|
|
id integer not null auto_increment,
|
|
|
|
dir varchar(254) not null,
|
|
|
|
name varchar(254) not null,
|
|
|
|
size double not null default 0,
|
|
|
|
chunk_size double not null default 0,
|
|
|
|
created double not null default 0,
|
|
|
|
need_update tinyint not null default 0,
|
2012-01-23 21:59:12 +00:00
|
|
|
inited tinyint not null default 0,
|
2012-01-23 05:03:52 +00:00
|
|
|
primary key(id)
|
|
|
|
) engine = InnoDB;
|
|
|
|
|
|
|
|
alter table vda_file add unique(name);
|
|
|
|
|
|
|
|
create table vda_chunk_host (
|
|
|
|
vda_file_id integer not null default 0,
|
2012-02-21 20:55:09 +00:00
|
|
|
name varchar(254) not null,
|
2012-01-23 05:03:52 +00:00
|
|
|
host_id integer not null default 0,
|
|
|
|
present_on_host tinyint not null default 0,
|
|
|
|
transfer_in_progress tinyint not null default 0,
|
|
|
|
transfer_wait tinyint not null default 0,
|
|
|
|
transition_time double not null default 0
|
|
|
|
) engine = InnoDB;
|
|
|
|
|
|
|
|
alter table vda_chunk_host
|
|
|
|
add index vch_file (vda_file_id),
|
|
|
|
add index vch_host (host_id),
|
|
|
|
add index vch_tt (transition_time);
|
2012-02-16 00:08:40 +00:00
|
|
|
|
|
|
|
alter table host
|
|
|
|
add index host_rpc_time (rpc_time);
|