diff options
author | linuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-20 20:44:59 +0000 |
---|---|---|
committer | linuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-05-20 20:44:59 +0000 |
commit | 813a4217f4d7ea58ee6eca9d2717c61d72b878c1 (patch) | |
tree | c2c8bc94f88de5c2a04aa5a4f967dbef01abaa85 | |
parent | 4c5af630de50f70d65b2b8d0f87d825dd3af5499 (diff) |
removal of universal id sequence
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1226 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | sql/Pg-database.sql | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql index a0c985b4..4d178d31 100644 --- a/sql/Pg-database.sql +++ b/sql/Pg-database.sql @@ -75,7 +75,8 @@ CREATE TABLE location ( city_province text check (city_province ~ '[[:alnum:]_]') NOT NULL, country_id integer not null REFERENCES country(id)); - +-- END entity + -- CREATE TABLE makemodel ( parts_id int PRIMARY KEY, @@ -84,7 +85,7 @@ CREATE TABLE makemodel ( ); -- CREATE TABLE gl ( - id int DEFAULT nextval ( 'id' ) PRIMARY KEY, + id serial PRIMARY KEY, reference text, description text, transdate date DEFAULT current_date, @@ -94,7 +95,7 @@ CREATE TABLE gl ( ); -- CREATE TABLE chart ( - id int DEFAULT nextval ( 'id' ) PRIMARY KEY, + id serial PRIMARY KEY, accno text NOT NULL, description text, charttype char(1) DEFAULT 'A', @@ -174,7 +175,7 @@ CREATE TABLE invoice ( ); -- CREATE TABLE customer ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, name varchar(64), address1 varchar(32), address2 varchar(32), @@ -209,7 +210,7 @@ CREATE TABLE customer ( -- -- CREATE TABLE parts ( - id int DEFAULT nextval ( 'id' ) PRIMARY KEY, + id serial PRIMARY KEY, partnumber text, description text, unit varchar(5), @@ -248,7 +249,7 @@ CREATE TABLE assembly ( ); -- CREATE TABLE ar ( - id int DEFAULT nextval ( 'id' ) PRIMARY KEY, + id serial PRIMARY KEY, invnumber text, transdate date DEFAULT current_date, customer_id int, @@ -275,7 +276,7 @@ CREATE TABLE ar ( ); -- CREATE TABLE ap ( - id int DEFAULT nextval ( 'id' ) PRIMARY KEY, + id serial PRIMARY KEY, invnumber text, transdate date DEFAULT current_date, vendor_id int, @@ -347,7 +348,7 @@ CREATE TABLE vendortax ( ); -- CREATE TABLE oe ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, ordnumber text, transdate date default current_date, vendor_id int, @@ -396,7 +397,7 @@ CREATE TABLE exchangerate ( ); -- create table employee ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, login text, name varchar(64), address1 varchar(32), @@ -438,7 +439,7 @@ create table shipto ( ); -- CREATE TABLE vendor ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, name varchar(64), address1 varchar(32), address2 varchar(32), @@ -473,7 +474,7 @@ CREATE TABLE vendor ( ); -- CREATE TABLE project ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, projectnumber text, description text, startdate date, @@ -485,7 +486,7 @@ CREATE TABLE project ( ); -- CREATE TABLE partsgroup ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, partsgroup text ); -- @@ -498,7 +499,7 @@ CREATE TABLE status ( ); -- CREATE TABLE department ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, description text, role char(1) default 'P' ); @@ -511,7 +512,7 @@ CREATE TABLE dpt_trans ( -- -- business table CREATE TABLE business ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, description text, discount numeric ); @@ -524,7 +525,7 @@ CREATE TABLE sic ( ); -- CREATE TABLE warehouse ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, description text ); -- @@ -555,7 +556,7 @@ CREATE TABLE partsvendor ( ); -- CREATE TABLE pricegroup ( - id int default nextval('id') PRIMARY KEY, + id serial PRIMARY KEY, pricegroup text ); -- |