forked from snyk-omar/monorepo-sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upgradeschema-2.6-oracle.config
35 lines (30 loc) · 2.15 KB
/
upgradeschema-2.6-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
# UpgradeSchema Control File (Default)
# Conversion needs the database connection details
dbDriver=oracle.jdbc.driver.OracleDriver
# dbURL=jdbc:oracle:thin:@host:12342:SAKAI
# dbUser=USER_NAME
# dbPass=USER_PW
# To rerun the conversion - just wipe out the new columns
# ALTER TABLE MAILARCHIVE_MESSAGE DROP COLUMN SUBJECT;
# ALTER TABLE MAILARCHIVE_MESSAGE DROP COLUMN BODY;
convert.0=ExtractXMLToColumns
convert.0.handler.class=org.sakaiproject.mailarchive.impl.conversion.ExtractXMLToColumns
convert.0.create.migrate.table.count=3
convert.0.create.migrate.table.0=create table MAILARCHIVE_XML_EXTRACT ( id VARCHAR2(1024), status VARCHAR2(99) )
convert.0.create.migrate.table.1=create index MAILARCHIVE_XML_EXTRACT_ID_IDX on MAILARCHIVE_XML_EXTRACT(id)
convert.0.create.migrate.table.2=create index MAILARCHIVE_XML_EXTRACT_STATUS_IDX on MAILARCHIVE_XML_EXTRACT(status)
convert.0.drop.migrate.table=drop table MAILARCHIVE_XML_EXTRACT
convert.0.check.migrate.table=select count(*) from MAILARCHIVE_XML_EXTRACT where status <> 'done'
convert.0.select.next.batch=select id from MAILARCHIVE_XML_EXTRACT where status = 'pending' and rownum <= 100
convert.0.complete.next.batch=update MAILARCHIVE_XML_EXTRACT set status = 'done' where id = ?
convert.0.mark.next.batch=update MAILARCHIVE_XML_EXTRACT set status = 'locked' where id = ?
convert.0.populate.migrate.table=insert into MAILARCHIVE_XML_EXTRACT (id,status) select MESSAGE_ID, 'pending' from MAILARCHIVE_MESSAGE where ( SUBJECT IS NULL and BODY IS NULL )
convert.0.select.record=select XML from MAILARCHIVE_MESSAGE where MESSAGE_ID = ?
convert.0.select.validate.record=select SUBJECT from MAILARCHIVE_MESSAGE where MESSAGE_ID = ?
convert.0.update.record=update MAILARCHIVE_MESSAGE set SUBJECT = ?, BODY = ? where MESSAGE_ID = ?
convert.0.new.columns.test=select column_name from user_tab_columns where table_name = 'MAILARCHIVE_MESSAGE' and column_name = '<name>'
convert.0.new.columns.add=alter table MAILARCHIVE_MESSAGE add <name> <type> <qualifier>
convert.0.new.columns.names=SUBJECT,BODY
convert.0.new.columns.types=VARCHAR2(255),CLOB
convert.0.new.columns.qualifiers=default null,default null
convert.0.early.termination.signal=quit.txt