summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-20 19:23:13 +0000
committerlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-20 19:23:13 +0000
commite0367e26800632ba06aa0f7314946173ba580928 (patch)
tree9f55a630e82055efa527afe91f20ab79d2e423e0
parent979ebcc1fb4704f95e6e362db497ceba53770cfc (diff)
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
-rw-r--r--sql/Pg-database.sql15
1 files 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,