Jon Stevens wrote:
>
> on 6/26/2000 10:22 AM, "Daniel L. Rall" <[EMAIL PROTECTED]> wrote:
>
> > If OID is a reserved word in Postgres, +1 on changing. I would suggest
> > choosing a more descriptive name than the very common "ID". "JOB_ID" or
> > "JOB_ENTRY_ID", perhaps? :)
>
> yes. i agree with Daniel's suggestions.
I have also included patches for the all the .sql build scripts to
reflect JOB_ID column.
Here are the patches for this:
***************** BEGIN PATCHES ************************************
Index: src/java/org/apache/turbine/services/schedule/JobEntryPeer.java
===================================================================
RCS file:
/products/cvs/turbine/turbine/src/java/org/apache/turbine/services/schedule/JobEntryPeer.java,v
retrieving revision 1.6
diff -r1.6 JobEntryPeer.java
80c80
<
---
>
85c85
< public static final String OID_COLUMN = "OID";
---
> public static final String OID_COLUMN = "JOB_ID";
92c92
<
---
>
101c101
<
---
>
134c134
<
---
>
150c150
<
---
>
153c153
<
---
>
169c169
<
---
>
193c193
< return je;
---
> return je;
195c195
< }
---
> }
Index: docs/schemas/Db2_users_roles_permissions.sql
===================================================================
RCS file:
/products/cvs/turbine/turbine/docs/schemas/Db2_users_roles_permissions.sql,v
retrieving revision 1.1
diff -r1.1 Db2_users_roles_permissions.sql
13c13
< --
---
> --
106c106
< DROP TABLE JOBENTRY
---
> DROP TABLE JOBENTRY
109c109
< OID INT NOT NULL,
---
> JOB_ID INT NOT NULL,
119c119
< ADD CONSTRAINT OID_PK PRIMARY KEY (OID)
---
> ADD CONSTRAINT JOB_ID_PK PRIMARY KEY (JOB_ID)
Index: docs/schemas/HypersonicSQL_users_roles_permissions.sql
===================================================================
RCS file:
/products/cvs/turbine/turbine/docs/schemas/HypersonicSQL_users_roles_permissions.sql,v
retrieving revision 1.1
diff -r1.1 HypersonicSQL_users_roles_permissions.sql
7,8c7,8
< -- The following steps use the DatabaseManger program harness
contained in
< -- the HypersonicSQL distribution.
---
> -- The following steps use the DatabaseManger program harness contained in
> -- the HypersonicSQL distribution.
11c11
< -- 2. Launch the Hypersonic Database Manager. See the Hypersonic SQL
---
> -- 2. Launch the Hypersonic Database Manager. See the Hypersonic SQL
13c13
< -- 3. In the Connect dialog box, choose 'HypersonicSQL Standalone' for
the
---
> -- 3. In the Connect dialog box, choose 'HypersonicSQL Standalone' for the
23c23
< -- 6. Make sure the Hypersonic SQL jar is in the CLASSPATH of your
servlet
---
> -- 6. Make sure the Hypersonic SQL jar is in the CLASSPATH of your servlet
86c86
< -- OID BIGINT NOT NULL PRIMARY KEY,
---
> -- JOB_ID BIGINT NOT NULL PRIMARY KEY,
95c95
< --
---
> --
100c100
< CREATE TABLE ID_TABLE
---
> CREATE TABLE ID_TABLE
Index: docs/schemas/InstantDB_users_roles_permissions.sql
===================================================================
RCS file:
/products/cvs/turbine/turbine/docs/schemas/InstantDB_users_roles_permissions.sql,v
retrieving revision 1.2
diff -r1.2 InstantDB_users_roles_permissions.sql
7,8c7,8
< ; The following steps use the ScriptTool program/test harness
contained in
< ; the InstantDB distribution.
---
> ; The following steps use the ScriptTool program/test harness contained in
> ; the InstantDB distribution.
11,12c11,12
< ; 2. Create an InstantDB properties file in the new directory called
< ; 'Turbine.prp'. Base this on the sample props file from the
---
> ; 2. Create an InstantDB properties file in the new directory called
> ; 'Turbine.prp'. Base this on the sample props file from the
14c14
< ; 3. Copy this file that you're reading into the database directory
and
---
> ; 3. Copy this file that you're reading into the database directory and
111c111
< ; OID long NOT NULL PRIMARY KEY,
---
> ; JOB_ID long NOT NULL PRIMARY KEY,
120c120
< ;
---
> ;
127c127
< e CREATE TABLE ID_TABLE
---
> e CREATE TABLE ID_TABLE
Index: docs/schemas/MySQL_users_roles_permissions.sql
===================================================================
RCS file:
/products/cvs/turbine/turbine/docs/schemas/MySQL_users_roles_permissions.sql,v
retrieving revision 1.1
diff -r1.1 MySQL_users_roles_permissions.sql
1c1
< ## This is a schema for MySQL for
---
> ## This is a schema for MySQL for
4,5c4,5
< ## Please see the Html documentation for more information
< ## on this SQL. Equivalent contributions of this for other
---
> ## Please see the Html documentation for more information
> ## on this SQL. Equivalent contributions of this for other
96c96
< OID int(11) NOT NULL PRIMARY KEY,
---
> JOB_ID int(11) NOT NULL PRIMARY KEY,
Index: docs/schemas/Oracle_users_roles_permissions.sql
===================================================================
RCS file:
/products/cvs/turbine/turbine/docs/schemas/Oracle_users_roles_permissions.sql,v
retrieving revision 1.1
diff -r1.1 Oracle_users_roles_permissions.sql
13c13
< --
---
> --
113c113
< DROP TABLE JOBENTRY
---
> DROP TABLE JOBENTRY
116c116
< OID INT NOT NULL,
---
> JOB_ID INT NOT NULL,
126c126
< ADD CONSTRAINT OID_PK PRIMARY KEY (OID)
---
> ADD CONSTRAINT JOB_ID_PK PRIMARY KEY (JOB_ID)
Index: docs/schemas/Sybase_users_roles_permissions.sql
===================================================================
RCS file:
/products/cvs/turbine/turbine/docs/schemas/Sybase_users_roles_permissions.sql,v
retrieving revision 1.2
diff -r1.2 Sybase_users_roles_permissions.sql
39c39
< OID int not null,
---
> JOB_ID int not null,
46c46
< constraint Jobentry_PK primary key (OID)
---
> constraint Jobentry_PK primary key (JOB_ID)
Index: docs/schemas/Postgres_users_roles_permissions.sql
===================================================================
RCS file:
/products/cvs/turbine/turbine/docs/schemas/Postgres_users_roles_permissions.sql,v
retrieving revision 1.1
diff -r1.1 Postgres_users_roles_permissions.sql
108a109,123
> -- ------------------------------------
> -- Creates Jobentry table for Postgres
> -- -----------------------------------
> drop table Jobentry;
>
> create table Jobentry (
> JOB_ID integer NOT NULL,
> MINUTE integer default -1 NOT NULL,
> HOUR integer default -1 NOT NULL,
> WEEKDAY integer default -1 NOT NULL,
> DAY_OF_MONTH integer default -1 NOT NULL,
> TASK varchar(99) NOT NULL,
> EMAIL varchar(99),
> PRIMARY KEY (JOB_ID)
> );
***************** END PATCHES ************************************
While changes are being made it would be helpful to add the following
script for postgres:
Postgres_id_table.sql
#########################################################
-- ------------------------------------
-- This table provides the primary keys for all
-- other tables in the system. Should be used
-- with util.db.IDBroker.
-- -----------------------------------
drop table id_table;
create table id_table
(
id_table_id integer NOT NULL,
table_name varchar(255) NOT NULL,
next_id integer,
quantity integer,
PRIMARY KEY (ID_TABLE_ID)
);
create unique index id_table_id_table_id on id_table(id_table_id);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity)
values (1, 'Permission', 20, 10);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity)
values (2, 'UserRole', 20, 10);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity)
values (3, 'Visitor', 20, 10);
insert into ID_TABLE (id_table_id, table_name, next_id, quantity)
values (4, 'Jobentry', 20, 10);
#########################################################
John
--
********************************
** John Thorhauer
** [EMAIL PROTECTED]
********************************
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]