From e0367e26800632ba06aa0f7314946173ba580928 Mon Sep 17 00:00:00 2001 From: linuxpoet Date: Sun, 20 May 2007 19:23:13 +0000 Subject: fixed really dumb use of sequences into serial git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1224 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/Pg-database.sql | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sql/Pg-database.sql b/sql/Pg-database.sql index afc9852c..4809f935 100644 --- a/sql/Pg-database.sql +++ b/sql/Pg-database.sql @@ -3,15 +3,6 @@ begin; CREATE SEQUENCE id start 10000; SELECT nextval ('id'); -- -CREATE SEQUENCE invoiceid; -SELECT nextval ('invoiceid'); --- -CREATE SEQUENCE orderitemsid; -SELECT nextval ('orderitemsid'); --- -CREATE SEQUENCE jcitemsid; -SELECT nextval ('jcitemsid'); --- CREATE TABLE transactions ( id int PRIMARY KEY, @@ -97,7 +88,7 @@ CREATE TABLE acc_trans ( ); -- CREATE TABLE invoice ( - id int DEFAULT nextval ( 'invoiceid' ) PRIMARY KEY, + id int serial PRIMARY KEY, trans_id int, parts_id int, description text, @@ -313,7 +304,7 @@ CREATE TABLE oe ( ); -- CREATE TABLE orderitems ( - id int default nextval('orderitemsid') PRIMARY KEY, + id int serial PRIMARY KEY, trans_id int, parts_id int, description text, @@ -562,7 +553,7 @@ CREATE TABLE recurringprint ( ); -- CREATE TABLE jcitems ( - id int default nextval('jcitemsid') PRIMARY KEY, + id int serial PRIMARY KEY, project_id int, parts_id int, description text, -- cgit v1.2.3