Class CmsUpdateDBProjectId
java.lang.Object
org.opencms.setup.db.A_CmsUpdateDBPart
org.opencms.setup.db.update6to7.CmsUpdateDBProjectId
org.opencms.setup.db.update6to7.mysql.CmsUpdateDBProjectId
- All Implemented Interfaces:
I_CmsUpdateDBPart
This class updates the project ids from integer values to CmsUUIDs in all existing database tables.
It creates new UUIDs for each existing project and stores it into a temporary table.
For each table using a project id a new column for the UUID is added and the according data is transferred.
After that the original indexes and the column for the project id index is dropped and the new column with the project uuid becomes the primary key.
-
Field Summary
Fields inherited from class org.opencms.setup.db.update6to7.CmsUpdateDBProjectId
COLUMN_PROJECT_ID, COLUMN_PROJECT_LASTMODIFIED, COLUMN_PROJECT_UUID, COLUMN_TEMP_PROJECT_UUID, HISTORY_PROJECTS_TABLE, QUERY_ADD_PRIMARY_KEY, QUERY_ADD_TEMP_UUID_COLUMN, QUERY_CREATE_HISTORY_PROJECTS_TABLE, QUERY_CREATE_TEMP_TABLE_UUIDS, QUERY_DESCRIBE_TABLE, QUERY_READ_MAX_PUBTAG, REPLACEMENT_COLUMN, REPLACEMENT_NEW_COLUMN, REPLACEMENT_OLDID, REPLACEMENT_PRIMARY_KEY, REPLACEMENT_TABLENAME, RESOURCE_TABLES, RESOURCES_TABLES_LIST, TABLES, TABLES_LIST, TEMP_UUID_COLUMN, TEMPORARY_TABLE_NAME
Fields inherited from class org.opencms.setup.db.A_CmsUpdateDBPart
m_poolData, m_queries
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Creates the CMS_HISTORY_PROJECTS table if it does not exist yet.protected void
createTempTable
(CmsSetupDb dbCon) Creates the temp table for project ids if it does not exist yet.Methods inherited from class org.opencms.setup.db.update6to7.CmsUpdateDBProjectId
addPrimaryKey, addUUIDColumnToTable, checkColumnTypeProjectId, getColumnProjectIdResourcePath, internalExecute, needsUpdating, transferDataToHistoryTable
Methods inherited from class org.opencms.setup.db.A_CmsUpdateDBPart
execute, getPoolData, getPropertyFileLocation, isKeepHistory, loadQueryProperties, readQuery
-
Constructor Details
-
CmsUpdateDBProjectId
Constructor.- Throws:
IOException
- if the query properties cannot be read
-
-
Method Details
-
createHistProjectsTable
Creates the CMS_HISTORY_PROJECTS table if it does not exist yet.- Overrides:
createHistProjectsTable
in classCmsUpdateDBProjectId
- Parameters:
dbCon
- the db connection interface- Throws:
SQLException
- if something goes wrong
-
createTempTable
Creates the temp table for project ids if it does not exist yet.- Overrides:
createTempTable
in classCmsUpdateDBProjectId
- Parameters:
dbCon
- the db connection interface- Throws:
SQLException
- if something goes wrong
-