delete from _own_branch_data;
delete from own_branch;
delete from _own_entity_data;
delete from own_entity;
delete from _entity_data;
delete from entity;

insert into entity (id) values (nextval('entity_id_seq'));
insert into _entity_data (name,_start_t,_table) values ('Casa Central',now(),currval('entity_id_seq'));
insert into own_entity (id) values (nextval('own_entity_id_seq'));
insert into _own_entity_data (id,_start_t,_table) values (currval('entity_id_seq'),now(),currval('own_entity_id_seq'));
insert into own_branch (id) values (nextval('own_branch_id_seq'));
insert into _own_branch_data (_table,_start_t,own_entity) values (currval('own_branch_id_seq'),current_timestamp,currval('own_entity_id_seq'));
