On Mar 28, 2007, at 1:50 PM, MikeCrosby wrote:
I'm looking at developing a migration plan for a custom portal I've
developed
using JS2.0. I'd like to migrate to 2.1 to take advantage of the
desktop
functionality.
I've noticed that there are table changes that are necessary
(http://portals.apache.org/jetspeed-2/guides/guide-migration.html).
However, it does not define the two new tables:
CUSTOM_PORTLET_MODE and
CUSTOM_WINDOW_STATE. Where can I find out about these table
definitions? I
do not want to overwrite any existing data since the portal is
currently
live in production (I will be testing this out on a development
server and
database). Will I need to seed these tables with any data?
The generic "XML: schema for these tables:
<!--
CustomPortletMode
-->
<table name="CUSTOM_PORTLET_MODE">
<column name="ID" primaryKey="true" required="true"
type="INTEGER"/>
<column name="APPLICATION_ID" required="true" type="INTEGER"/>
<column name="CUSTOM_NAME" required="true" size="150"
type="VARCHAR"/>
<column name="MAPPED_NAME" size="150" type="VARCHAR"/>
<column name="DESCRIPTION" type="LONGVARCHAR"/>
<foreign-key foreignTable="PORTLET_APPLICATION"
name="FK_CUSTOM_PORTLET_MODE_1" onDelete="cascade">
<reference foreign="APPLICATION_ID"
local="APPLICATION_ID"/>
</foreign-key>
</table>
<!--
CustomWindowState
-->
<table name="CUSTOM_WINDOW_STATE">
<column name="ID" primaryKey="true" required="true"
type="INTEGER"/>
<column name="APPLICATION_ID" required="true" type="INTEGER"/>
<column name="CUSTOM_NAME" required="true" size="150"
type="VARCHAR"/>
<column name="MAPPED_NAME" size="150" type="VARCHAR"/>
<column name="DESCRIPTION" type="LONGVARCHAR"/>
<foreign-key foreignTable="PORTLET_APPLICATION"
name="FK_CUSTOM_WINDOW_STATE_1" onDelete="cascade">
<reference foreign="APPLICATION_ID"
local="APPLICATION_ID"/>
</foreign-key>
</table>
after building, look in the target/portal-sql/${DBNAME}/ registry-
schema.sql.
Here is an example for MySQL
#
-----------------------------------------------------------------------
# CUSTOM_PORTLET_MODE
#
-----------------------------------------------------------------------
drop table if exists CUSTOM_PORTLET_MODE;
CREATE TABLE CUSTOM_PORTLET_MODE
(
ID MEDIUMINT NOT NULL,
APPLICATION_ID MEDIUMINT NOT NULL,
CUSTOM_NAME VARCHAR(150) NOT NULL,
MAPPED_NAME VARCHAR(150),
DESCRIPTION MEDIUMTEXT,
PRIMARY KEY(ID),
FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION
(APPLICATION_ID)
ON DELETE CASCADE
);
#
-----------------------------------------------------------------------
# CUSTOM_WINDOW_STATE
#
-----------------------------------------------------------------------
drop table if exists CUSTOM_WINDOW_STATE;
CREATE TABLE CUSTOM_WINDOW_STATE
(
ID MEDIUMINT NOT NULL,
APPLICATION_ID MEDIUMINT NOT NULL,
CUSTOM_NAME VARCHAR(150) NOT NULL,
MAPPED_NAME VARCHAR(150),
DESCRIPTION MEDIUMTEXT,
PRIMARY KEY(ID),
FOREIGN KEY (APPLICATION_ID) REFERENCES PORTLET_APPLICATION
(APPLICATION_ID)
ON DELETE CASCADE
);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]