forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upgradeschema-2.6-mysql.config
40 lines (34 loc) · 2.22 KB
/
upgradeschema-2.6-mysql.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
# UpgradeSchema Control File (Default)
# Conversion needs the database connection details
dbDriver=com.mysql.jdbc.Driver
# dbURL=PUT_YOUR_URL_HERE
# dbUser=PUT_YOUR_USERNAME_HERE
# dbPass=PUT_YOUR_PASSWORD_HERE
# Chuck's Sample settings
dbURL=jdbc:mysql://localhost:3306/sakai?useUnicode=true&characterEncoding=UTF-8
dbUser=sakaiuser
dbPass=sakaipassword
# 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 varchar(1024), status varchar(99) )
convert.0.create.migrate.table.1=create unique 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' limit 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.names=SUBJECT,BODY
convert.0.new.columns.types=VARCHAR(255),LONGTEXT
convert.0.new.columns.qualifiers=null, null
convert.0.new.columns.add=alter table MAILARCHIVE_MESSAGE add <name> <type> <qualifier>
convert.0.new.columns.test=show columns from MAILARCHIVE_MESSAGE like '<name>'
convert.0.early.termination.signal=quit.txt