delete from _branch_document_data;
delete from branch_document;

insert into branch_document (id) values (nextval('branch_document_id_seq'));
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (nextval('_branch_document_data_id_seq'),currval('branch_document_id_seq'),current_timestamp,1,1);
insert into branch_document (id) values (nextval('branch_document_id_seq'));
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (nextval('_branch_document_data_id_seq'),currval('branch_document_id_seq'),current_timestamp,1,2);
insert into branch_document (id) values (nextval('branch_document_id_seq'));
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (nextval('_branch_document_data_id_seq'),currval('branch_document_id_seq'),current_timestamp,1,3);
insert into branch_document (id) values (nextval('branch_document_id_seq'));
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (nextval('_branch_document_data_id_seq'),currval('branch_document_id_seq'),current_timestamp,1,4);
insert into branch_document (id) values (nextval('branch_document_id_seq'));
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (nextval('_branch_document_data_id_seq'),currval('branch_document_id_seq'),current_timestamp,1,5);
insert into branch_document (id) values (nextval('branch_document_id_seq'));
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (nextval('_branch_document_data_id_seq'),currval('branch_document_id_seq'),current_timestamp,1,6);

update _branch_document_data set number = 1;