1 |
|
|
2 |
CREATE TABLE _account_plan_data ( |
CREATE TABLE _account_plan_data ( |
3 |
id serial PRIMARY KEY, |
id serial PRIMARY KEY, |
4 |
_start_t timestamp, |
_start_t timestamp, |
66 |
); |
); |
67 |
CREATE TABLE _barter_type_data ( |
CREATE TABLE _barter_type_data ( |
68 |
id serial PRIMARY KEY, |
id serial PRIMARY KEY, |
69 |
description varchar(255), |
description text, |
70 |
_start_t timestamp, |
_start_t timestamp, |
71 |
_end_t timestamp, |
_end_t timestamp, |
72 |
name varchar(80), |
name varchar(80), |
172 |
); |
); |
173 |
CREATE TABLE _document_type_data ( |
CREATE TABLE _document_type_data ( |
174 |
id serial PRIMARY KEY, |
id serial PRIMARY KEY, |
175 |
description varchar(255), |
description text, |
176 |
_start_t timestamp, |
_start_t timestamp, |
177 |
_end_t timestamp, |
_end_t timestamp, |
178 |
name varchar(80), |
name varchar(80), |
312 |
); |
); |
313 |
CREATE TABLE _obligation_type_data ( |
CREATE TABLE _obligation_type_data ( |
314 |
id serial PRIMARY KEY, |
id serial PRIMARY KEY, |
315 |
description varchar(255), |
description text, |
316 |
_start_t timestamp, |
_start_t timestamp, |
317 |
_end_t timestamp, |
_end_t timestamp, |
318 |
name varchar(80), |
name varchar(80), |
391 |
_start_t timestamp, |
_start_t timestamp, |
392 |
_end_t timestamp, |
_end_t timestamp, |
393 |
is_product char(1), |
is_product char(1), |
394 |
|
name varchar(255), |
395 |
_table bigint, |
_table bigint, |
396 |
parent bigint |
parent bigint |
397 |
); |
); |
416 |
canonical_name varchar(80), |
canonical_name varchar(80), |
417 |
_start_t timestamp, |
_start_t timestamp, |
418 |
_end_t timestamp, |
_end_t timestamp, |
419 |
|
salable char(1), |
420 |
is_perishable char(1), |
is_perishable char(1), |
421 |
_table bigint, |
_table bigint, |
422 |
product_classification bigint, |
product_classification bigint, |
562 |
); |
); |
563 |
CREATE TABLE _ticket_type_data ( |
CREATE TABLE _ticket_type_data ( |
564 |
id serial PRIMARY KEY, |
id serial PRIMARY KEY, |
565 |
description varchar(255), |
description text, |
566 |
_start_t timestamp, |
_start_t timestamp, |
567 |
_end_t timestamp, |
_end_t timestamp, |
568 |
name varchar(80), |
name varchar(80), |
644 |
); |
); |
645 |
CREATE TABLE alien_service_item ( |
CREATE TABLE alien_service_item ( |
646 |
id bigserial PRIMARY KEY, |
id bigserial PRIMARY KEY, |
647 |
description varchar(255), |
description text, |
648 |
amount numeric(12,4), |
amount numeric(12,4), |
649 |
account_plan bigint, |
account_plan bigint, |
650 |
entry int, |
entry int, |
893 |
); |
); |
894 |
CREATE TABLE own_service_item ( |
CREATE TABLE own_service_item ( |
895 |
id bigserial PRIMARY KEY, |
id bigserial PRIMARY KEY, |
896 |
description varchar(255), |
description text, |
897 |
amount numeric(12,4), |
amount numeric(12,4), |
898 |
account_plan bigint, |
account_plan bigint, |
899 |
own_item bigint, |
own_item bigint, |
1279 |
ALTER TABLE barter_movement ADD FOREIGN KEY (entry) REFERENCES entry; |
ALTER TABLE barter_movement ADD FOREIGN KEY (entry) REFERENCES entry; |
1280 |
ALTER TABLE barter_movement ADD FOREIGN KEY (movement) REFERENCES movement; |
ALTER TABLE barter_movement ADD FOREIGN KEY (movement) REFERENCES movement; |
1281 |
ALTER TABLE barter_movement ADD FOREIGN KEY (barter) REFERENCES _barter_data; |
ALTER TABLE barter_movement ADD FOREIGN KEY (barter) REFERENCES _barter_data; |
1282 |
|
|
1283 |
DELETE FROM "_country_data"; |
DELETE FROM "_country_data"; |
1284 |
DELETE FROM "country"; |
DELETE FROM "country"; |
1285 |
INSERT INTO "country" VALUES (nextval('country_id_seq')); |
INSERT INTO "country" VALUES (nextval('country_id_seq')); |
1742 |
INSERT INTO "_country_data" ("_start_t","_end_t","name","un","iso2","iso3","phone","_table") VALUES (NULL,NULL,'Anguilla',660,'AI','AIA',2,currval('country_id_seq')); |
INSERT INTO "_country_data" ("_start_t","_end_t","name","un","iso2","iso3","phone","_table") VALUES (NULL,NULL,'Anguilla',660,'AI','AIA',2,currval('country_id_seq')); |
1743 |
INSERT INTO "country" VALUES (nextval('country_id_seq')); |
INSERT INTO "country" VALUES (nextval('country_id_seq')); |
1744 |
INSERT INTO "_country_data" ("_start_t","_end_t","name","un","iso2","iso3","phone","_table") VALUES (NULL,NULL,'Antigua and Barbuda',28,'AG','ATG',1,currval('country_id_seq')); |
INSERT INTO "_country_data" ("_start_t","_end_t","name","un","iso2","iso3","phone","_table") VALUES (NULL,NULL,'Antigua and Barbuda',28,'AG','ATG',1,currval('country_id_seq')); |
1745 |
UPDATE "_country_data" SET "_start_t" = current_timestamp;delete from _currency_type_data; |
UPDATE "_country_data" SET "_start_t" = current_timestamp; |
1746 |
|
|
1747 |
|
delete from _currency_type_data; |
1748 |
delete from currency_type; |
delete from currency_type; |
1749 |
|
|
1750 |
insert into currency_type (id) values (1); |
insert into currency_type (id) values (1); |
1766 |
insert into document_type (id) values (6); |
insert into document_type (id) values (6); |
1767 |
insert into _document_type_data (id,_table,name,_start_t) values (6,6,'Orden de Pago',current_timestamp); |
insert into _document_type_data (id,_table,name,_start_t) values (6,6,'Orden de Pago',current_timestamp); |
1768 |
|
|
1769 |
|
delete from _entity_data; |
1770 |
|
delete from entity; |
1771 |
|
delete from _own_entity_data; |
1772 |
|
delete from own_entity; |
1773 |
|
delete from _own_branch_data; |
1774 |
|
delete from own_branch; |
1775 |
|
|
1776 |
|
insert into entity (id) values (nextval('entity_id_seq')); |
1777 |
|
insert into _entity_data (name,_table) values ('Casa Central',currval('entity_id_seq')); |
1778 |
|
insert into own_entity (id) values (nextval('own_entity_id_seq')); |
1779 |
|
insert into _own_entity_data (id,_table) values (currval('entity_id_seq'),currval('own_entity_id_seq')); |
1780 |
|
insert into own_branch (id) values (nextval('own_branch_id_seq')); |
1781 |
|
insert into _own_branch_data (_table,_start_t,own_entity) values (currval('own_branch_id_seq'),current_timestamp,currval('own_entity_id_seq')); |
1782 |
|
|
1783 |
delete from _branch_document_data; |
delete from _branch_document_data; |
1784 |
delete from branch_document; |
delete from branch_document; |
1785 |
|
|
1786 |
insert into branch_document (id) values (1); |
insert into branch_document (id) values (1); |
1787 |
insert into _branch_document_data (id,_table,_start_t) values (1,1,current_timestamp); |
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (1,1,current_timestamp,1,1); |
1788 |
insert into branch_document (id) values (2); |
insert into branch_document (id) values (2); |
1789 |
insert into _branch_document_data (id,_table,_start_t) values (2,2,current_timestamp); |
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (2,2,current_timestamp,1,2); |
1790 |
insert into branch_document (id) values (3); |
insert into branch_document (id) values (3); |
1791 |
insert into _branch_document_data (id,_table,_start_t) values (3,3,current_timestamp); |
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (3,3,current_timestamp,1,3); |
1792 |
insert into branch_document (id) values (4); |
insert into branch_document (id) values (4); |
1793 |
insert into _branch_document_data (id,_table,_start_t) values (4,4,current_timestamp); |
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (4,4,current_timestamp,1,4); |
1794 |
insert into branch_document (id) values (5); |
insert into branch_document (id) values (5); |
1795 |
insert into _branch_document_data (id,_table,_start_t) values (5,5,current_timestamp); |
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (5,5,current_timestamp,1,5); |
1796 |
insert into branch_document (id) values (6); |
insert into branch_document (id) values (6); |
1797 |
insert into _branch_document_data (id,_table,_start_t) values (6,6,current_timestamp); |
insert into _branch_document_data (id,_table,_start_t,branch,document_type) values (6,6,current_timestamp,1,6); |
1798 |
|
|
1799 |
delete from _entity_uid_type_data; |
delete from _entity_uid_type_data; |
1800 |
delete from entity_uid_type; |
delete from entity_uid_type; |
1803 |
insert into _entity_uid_type_data (id,_table,name,_start_t) values (1,1,'CUIT',current_timestamp); |
insert into _entity_uid_type_data (id,_table,name,_start_t) values (1,1,'CUIT',current_timestamp); |
1804 |
insert into entity_uid_type (id) values (2); |
insert into entity_uid_type (id) values (2); |
1805 |
insert into _entity_uid_type_data (id,_table,name,_start_t) values (2,2,'Ingresos Brutos',current_timestamp); |
insert into _entity_uid_type_data (id,_table,name,_start_t) values (2,2,'Ingresos Brutos',current_timestamp); |
1806 |
|
|
1807 |
delete from _movement_type_data; |
delete from _movement_type_data; |
1808 |
delete from movement_type; |
delete from movement_type; |
1809 |
|
|
1810 |
insert into movement_type (id) values (1); |
insert into movement_type (id) values (1); |
1811 |
insert into _movement_type_data (id,_table,name,_start_t) values (1,1,'Cuenta Corriente',current_timestamp); |
insert into _movement_type_data (id,_table,name,_start_t) values (1,1,'Cuenta Corriente',current_timestamp); |
1812 |
|
|