[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1226] trunk/sql/Pg-database.sql



Revision: 1226
          http://svn.sourceforge.net/ledger-smb/?rev=1226&view=rev
Author:   linuxpoet
Date:     2007-05-20 13:44:59 -0700 (Sun, 20 May 2007)

Log Message:
-----------
removal of universal id sequence

Modified Paths:
--------------
    trunk/sql/Pg-database.sql

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2007-05-20 20:41:43 UTC (rev 1225)
+++ trunk/sql/Pg-database.sql	2007-05-20 20:44:59 UTC (rev 1226)
@@ -75,7 +75,8 @@
   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 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 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 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 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 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 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 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 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 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 project (
-  id int default nextval('id') PRIMARY KEY,
+  id serial PRIMARY KEY,
   projectnumber text,
   description text,
   startdate date,
@@ -485,7 +486,7 @@
 );
 --
 CREATE TABLE partsgroup (
-  id int default nextval('id') PRIMARY KEY,
+  id serial PRIMARY KEY,
   partsgroup text
 );
 --
@@ -498,7 +499,7 @@
 );
 --
 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 @@
 --
 -- 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 warehouse (
-  id int default nextval('id') PRIMARY KEY,
+  id serial PRIMARY KEY,
   description text
 );
 --
@@ -555,7 +556,7 @@
 );
 --
 CREATE TABLE pricegroup (
-  id int default nextval('id') PRIMARY KEY,
+  id serial PRIMARY KEY,
   pricegroup text
 );
 --


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.