forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupgradeschema-oracle.config
71 lines (67 loc) · 6.04 KB
/
upgradeschema-oracle.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# UpgradeSchema Control File (Default)
# Conversion needs the database connection details
dbDriver=oracle.jdbc.driver.OracleDriver
dbURL=PUT_YOUR_URL_HERE
dbUser=PUT_YOUR_USERNAME_HERE
dbPass=PUT_YOUR_PASSWORD_HERE
## Type1BlobResourceConversion adds columns to the content_resource table for the new quota and resource-type
## queries, and switches from XML serialization to binary-entity serialization.
convert.0=Type1BlobResourceConversion
convert.0.handler.class=org.sakaiproject.content.impl.serialize.impl.conversion.Type1BlobResourcesConversionHandler
convert.0.create.migrate.table.count=6
convert.0.create.migrate.table.0=create table CONTENT_RES_T1REGISTER ( id VARCHAR2(1024), status VARCHAR2(99) )
convert.0.create.migrate.table.1=create index CONTENT_RES_T1REGISTER_ID_IDX on CONTENT_RES_T1REGISTER(id)
convert.0.create.migrate.table.2=create index CONTENT_RES_T1REGISTER_ST_IDX on CONTENT_RES_T1REGISTER(status)
convert.0.create.migrate.table.3=create index CONTENT_RESOURCE_CI ON CONTENT_RESOURCE (CONTEXT)
convert.0.create.migrate.table.4=create index CONTENT_RESOURCE_RTI ON CONTENT_RESOURCE (RESOURCE_TYPE_ID)
convert.0.create.migrate.table.5=create index CONTENT_RESOURCE_FSI on CONTENT_RESOURCE(FILE_SIZE,0)
convert.0.drop.migrate.table.count=4
convert.0.drop.migrate.table.0=drop table CONTENT_RES_T1REGISTER
convert.0.drop.migrate.table.1=create index CONTENT_RESOURCE_BLOB_IDX on CONTENT_RESOURCE(BINARY_ENTITY, 0)
convert.0.drop.migrate.table.2=update CONTENT_RESOURCE set XML = NULL where BINARY_ENTITY is not NULL
convert.0.drop.migrate.table.3=drop index CONTENT_RESOURCE_BLOB_IDX
convert.0.check.migrate.table=select count(*) from CONTENT_RES_T1REGISTER where status <> 'done'
convert.0.select.next.batch=select id from CONTENT_RES_T1REGISTER where status = 'pending' and rownum <= 100
convert.0.complete.next.batch=update CONTENT_RES_T1REGISTER set status = 'done' where id = ?
convert.0.mark.next.batch=update CONTENT_RES_T1REGISTER set status = 'locked' where id = ?
convert.0.populate.migrate.table=INSERT INTO CONTENT_RES_T1REGISTER (id, status) SELECT RESOURCE_ID, 'pending' FROM CONTENT_RESOURCE source_table WHERE NOT exists (select id FROM CONTENT_RES_T1REGISTER register_table where source_table.RESOURCE_ID=register_table.id)
convert.0.select.record=select XML from CONTENT_RESOURCE where RESOURCE_ID = ?
convert.0.select.validate.record=select BINARY_ENTITY from CONTENT_RESOURCE where RESOURCE_ID = ?
convert.0.update.record=update CONTENT_RESOURCE set CONTEXT = ?, FILE_SIZE = ?, BINARY_ENTITY = ?, RESOURCE_TYPE_ID = ? where RESOURCE_ID = ?
convert.0.new.columns.names=CONTEXT,FILE_SIZE,RESOURCE_TYPE_ID,BINARY_ENTITY
convert.0.new.columns.types=VARCHAR2(99),NUMBER(18),VARCHAR2(255),BLOB
convert.0.new.columns.qualifiers=default null,default null,default null,default null
convert.0.new.columns.add=alter table CONTENT_RESOURCE add <name> <type> <qualifier>
convert.0.new.columns.test=select column_name from user_tab_columns where table_name = 'CONTENT_RESOURCE' and column_name = '<name>'
convert.0.create.error.table=create table CONTENT_CONVERSION_ERRORS ( entity_id VARCHAR2(255), conversion VARCHAR2(255), error_description VARCHAR2(1024), report_time TIMESTAMP default LOCALTIMESTAMP )
convert.0.report.error=insert into CONTENT_CONVERSION_ERRORS (entity_id,conversion,error_description) values (?,?,?)
convert.0.verify.error.table=select column_name from user_tab_columns where table_name = 'CONTENT_CONVERSION_ERRORS'
convert.0.early.termination.signal=quit.txt
## convert to binary-entity serialization for content_collection table
## comment out this step unless you are switching from XML to binary-entity serialization
convert.1=Type1BlobCollectionConversion
convert.1.handler.class=org.sakaiproject.content.impl.serialize.impl.conversion.Type1BlobCollectionConversionHandler
convert.1.create.migrate.table.count=3
convert.1.create.migrate.table.0=create table CONTENT_COL_T1REGISTER ( id VARCHAR2(1024), status VARCHAR2(99) )
convert.1.create.migrate.table.1=create index CONTENT_COL_T1REGISTER_id_idx on CONTENT_COL_T1REGISTER(id)
convert.1.create.migrate.table.2=create index CONTENT_COL_T1REGISTER_st_idx on CONTENT_COL_T1REGISTER(status)
convert.1.drop.migrate.table.count=2
convert.1.drop.migrate.table.0=drop table CONTENT_COL_T1REGISTER
convert.1.drop.migrate.table.1=update CONTENT_COLLECTION set XML = NULL where BINARY_ENTITY is not NULL
convert.1.check.migrate.table=select count(*) from CONTENT_COL_T1REGISTER where status <> 'done'
convert.1.select.next.batch=select id from CONTENT_COL_T1REGISTER where status = 'pending' and rownum <= 100
convert.1.complete.next.batch=update CONTENT_COL_T1REGISTER set status = 'done' where id = ?
convert.1.mark.next.batch=update CONTENT_COL_T1REGISTER set status = 'locked' where id = ?
convert.1.populate.migrate.table=INSERT INTO CONTENT_COL_T1REGISTER (id, status) SELECT collection_id, 'pending' FROM CONTENT_COLLECTION source_table WHERE NOT exists (select id FROM CONTENT_COL_T1REGISTER register_table where source_table.collection_id=register_table.id)
convert.1.select.record=select XML from CONTENT_COLLECTION where COLLECTION_ID = ?
convert.1.select.validate.record=select BINARY_ENTITY from CONTENT_COLLECTION where COLLECTION_ID = ?
convert.1.update.record=update CONTENT_COLLECTION set BINARY_ENTITY = ? where COLLECTION_ID = ?
convert.1.new.columns.names=BINARY_ENTITY
convert.1.new.columns.types=BLOB
convert.1.new.columns.qualifiers=default null
convert.1.new.columns.add=alter table CONTENT_COLLECTION add <name> <type> <qualifier>
convert.1.new.columns.test=select column_name from user_tab_columns where table_name = 'CONTENT_COLLECTION' and column_name = '<name>'
convert.1.verify.error.table=select column_name from user_tab_columns where table_name = 'CONTENT_CONVERSION_ERRORS'
convert.1.create.error.table=create table CONTENT_CONVERSION_ERRORS ( entity_id VARCHAR2(255), conversion VARCHAR2(255), error_description VARCHAR2(1024), report_time TIMESTAMP default LOCALTIMESTAMP )
convert.1.report.error=insert into CONTENT_CONVERSION_ERRORS (entity_id,conversion,error_description) values (?,?,?)
convert.1.early.termination.signal=quit.txt