portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject database changes required for moving from 2.0 M3 to 2.1-dev
Date Thu, 01 Jun 2006 18:47:22 GMT
[FYI]
I recently updated a 2.0 M3 installation to 2.1-dev
Here are the database changes required (in MySQL 4.1 compatible DDL):

alter table RULE_CRITERION change VALUE COLUMN_VALUE VARCHAR(128);
alter table SECURITY_CREDENTIAL change VALUE COLUMN_VALUE VARCHAR(254);
alter table PA_METADATA_FIELDS change VALUE COLUMN_VALUE VARCHAR;
alter table PD_METADATA_FIELDS change VALUE COLUMN_VALUE VARCHAR;

CREATE TABLE CUSTOM_PORTLET_MODE
(
     ID INTEGER NOT NULL,
     APPLICATION_ID INTEGER NOT NULL,
     CUSTOM_NAME VARCHAR(150) NOT NULL,
     MAPPED_NAME VARCHAR(150),
     DESCRIPTION LONG VARCHAR,
     PRIMARY KEY(ID),
     FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION 
(APPLICATION_ID)
         ON DELETE CASCADE
   );

-----------------------------------------------------------------------------
-- CUSTOM_WINDOW_STATE
-----------------------------------------------------------------------------

CREATE TABLE CUSTOM_WINDOW_STATE
(
     ID INTEGER NOT NULL,
     APPLICATION_ID INTEGER NOT NULL,
     CUSTOM_NAME VARCHAR(150) NOT NULL,
     MAPPED_NAME VARCHAR(150),
     DESCRIPTION LONG VARCHAR,
     PRIMARY KEY(ID),
     FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION 
(APPLICATION_ID)
         ON DELETE CASCADE
   );


CREATE TABLE PORTLET_STATISTICS
(
     IPADDRESS VARCHAR(80),
     USER_NAME VARCHAR(80),
     TIME_STAMP TIMESTAMP,
     PAGE VARCHAR(80),
     PORTLET VARCHAR(255),
     STATUS MEDIUMINT,
     ELAPSED_TIME MEDIUMINT);

# -----------------------------------------------------------------------
# PAGE_STATISTICS
# -----------------------------------------------------------------------
drop table if exists PAGE_STATISTICS;

CREATE TABLE PAGE_STATISTICS
(
     IPADDRESS VARCHAR(80),
     USER_NAME VARCHAR(80),
     TIME_STAMP TIMESTAMP,
     PAGE VARCHAR(80),
     STATUS MEDIUMINT,
     ELAPSED_TIME MEDIUMINT);

# -----------------------------------------------------------------------
# USER_STATISTICS
# -----------------------------------------------------------------------
drop table if exists USER_STATISTICS;

CREATE TABLE USER_STATISTICS
(
     IPADDRESS VARCHAR(80),
     USER_NAME VARCHAR(80),
     TIME_STAMP TIMESTAMP,
     STATUS MEDIUMINT,
     ELAPSED_TIME MEDIUMINT);


# -----------------------------------------------------------------------
# PREFERENCES
# -----------------------------------------------------------------------

If you don't have user-specific preferences, simply drop the OLD 
preferences tables and re-add the new ones, and then when re-registering 
your portlet apps, the default preferences will correctly write out
If you do have user-specific preferences, you will need to write a 
conversion program (i didnt have that requirement)

drop table if exists PREFS_PROPERTY_VALUE;
drop table if exists PREFS_NODE_PROPERTY_KEY;
drop table if exists PREFS_PROPERTY_KEY;
drop table if exists PREFS_NODE;
	
CREATE TABLE PREFS_PROPERTY_VALUE
(
     PROPERTY_VALUE_ID MEDIUMINT NOT NULL,
     NODE_ID MEDIUMINT,
     PROPERTY_NAME VARCHAR(100),
     PROPERTY_VALUE VARCHAR(254),
     CREATION_DATE TIMESTAMP,
     MODIFIED_DATE TIMESTAMP,
     PRIMARY KEY(PROPERTY_VALUE_ID));

CREATE TABLE PREFS_NODE
(
     NODE_ID MEDIUMINT NOT NULL,
     PARENT_NODE_ID MEDIUMINT,
     NODE_NAME VARCHAR(100),
     NODE_TYPE SMALLINT,
     FULL_PATH VARCHAR(254),
     CREATION_DATE TIMESTAMP,
     MODIFIED_DATE TIMESTAMP,
     PRIMARY KEY(NODE_ID),
     FOREIGN KEY (PARENT_NODE_ID) REFERENCES PREFS_NODE (NODE_ID)
     );




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message