Page History
<?xml version="1.0" encoding="utf-8"?>
<html>
This document covers my experience with upgrading DSpace@MITs Postgres instance during the 1.4.2 to 1.5. More speciically, thanks to deal's uncovered by Larry Stone we discovered that Postgres 7.3 or earlier used raw Triggers to implement system Constrains in Postgres and that if you've been maintaing an instance of DSpace that originated on postgres 7.3 or earlier that dealing with database table drops in the 1.5 upgrade process will leave behind broken triggers that have random identifiers and cannot be easily removed with serious review of the database schema.
I've worked a more general solution to the above problem that works by (1) performing a small number of SQL statements that will remove unnecessary tables and columns from the database (2) separating the database data in a backup from from its schema and (3) restoring that data to a fresh instance of the appropriate schema for DSpace 1.4.2 (that has been altered to remove any data inserts. This script and schema are included here. However, it may require tailoring to meet the requirements of your system.
<b>Caution, this script can bring much harm to a database that contains many local customizations, you should seriously consult with your system admin and DSpace admin (as well as the community) before performing any of the following.</b>
Drop any tables that are not represented in the DSpace 1.4.2 Schema
Panel |
---|
|
- This table contains dulicate keys which require dropping, the content of this table is temporary
Panel - Many of the existing records are stale. The table will be restored by the new schema
psql -U dspace -d dspace.mit.edu -c 'DROP TABLE registrationdata;'
psql -U dspace -d dspace.mit.edu -c 'DROP SEQUENCE registrationdata_seq;'
- Many of the existing records are stale. The table will be restored by the new schema
Dump the existing Database data to a backup file
Panel |
---|
|
Drop and recreate the database using the altered 1.4.2 schema
Panel |
---|
|
Enable dspace as a super user
Panel |
---|
|
Restore the data
Panel |
---|
|
Disable the Superuser
Panel |
---|
|
Required files to perform the above work
Database_schema_1_4_2_altered_sql.mht
</html>