forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upgradeschema_oracle.config
53 lines (49 loc) · 4.61 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
# 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
convert.0=SubmitterIdAssignmentsConversion
convert.0.handler.class=org.sakaiproject.assignment.impl.conversion.impl.SubmitterIdAssignmentsConversionHandler
convert.0.new.columns.names=SUBMITTER_ID,SUBMIT_TIME,SUBMITTED,GRADED,KEEP
convert.0.new.columns.types=VARCHAR(99),VARCHAR(99),VARCHAR(6),VARCHAR(6),VARCHAR(1)
convert.0.new.columns.qualifiers=default null,default null,default null,default null,default 'X'
convert.0.new.columns.add=alter table ASSIGNMENT_SUBMISSION add <name> <type> <qualifier>
convert.0.new.columns.test=SELECT column_name FROM user_tab_columns WHERE table_name='ASSIGNMENT_SUBMISSION' and column_name='<name>'
convert.0.create.migrate.table=create table assn_submit_fsregister ( id varchar(1024), status varchar(99) )
convert.0.drop.migrate.table=drop table assn_submit_fsregister
convert.0.check.migrate.table=select count(*) from assn_submit_fsregister where status <> 'done'
convert.0.select.next.batch=select id from assn_submit_fsregister where status = 'pending' and rownum <= 100
convert.0.complete.next.batch=update assn_submit_fsregister set status = 'done' where id = ?
convert.0.mark.next.batch=update assn_submit_fsregister set status = 'locked' where id = ?
convert.0.populate.migrate.table=insert into assn_submit_fsregister (id,status) select SUBMISSION_ID, 'pending' from ASSIGNMENT_SUBMISSION
convert.0.select.record=select XML from ASSIGNMENT_SUBMISSION where SUBMISSION_ID = ?
convert.0.select.validate.record=select XML from ASSIGNMENT_SUBMISSION where SUBMISSION_ID = ?
convert.0.update.record=update ASSIGNMENT_SUBMISSION set SUBMITTER_ID = ?, SUBMIT_TIME = ?, SUBMITTED = ?, GRADED = ? where SUBMISSION_ID = ?
convert.1=DuplicateSubmissionAssignmentsConversion
convert.1.handler.class=org.sakaiproject.assignment.impl.conversion.impl.CombineDuplicateSubmissionsConversionHandler
convert.1.create.migrate.table=create table assn_dupes_fsregister (id VARCHAR(99), STATUS VARCHAR(99))
convert.1.drop.migrate.table=drop table assn_dupes_fsregister
convert.1.check.migrate.table=select count(*) from assn_dupes_fsregister where status <> 'done'
convert.1.select.next.batch=select id from assn_dupes_fsregister where status = 'pending' rownum <= 100
convert.1.complete.next.batch=update assn_dupes_fsregister set status = 'done' where id = ?
convert.1.mark.next.batch=update assn_dupes_fsregister set status = 'locked' where id = ?
#convert.1.populate.migrate.table=insert into assn_dupes_fsregister (id,status) select SUBMISSION_ID,'pending' from ASSIGNMENT_SUBMISSION group by CONTEXT,SUBMITTER_ID HAVING count(SUBMISSION_ID) > 1
convert.1.populate.migrate.table=select submission_id, 'pending' from assignment_submission where submitter_id in (select SUBMITTER_ID from ASSIGNMENT_SUBMISSION group by CONTEXT, SUBMITTER_ID HAVING count(SUBMITTER_ID) > 1)
convert.1.select.record=select XML from ASSIGNMENT_SUBMISSION where (CONTEXT, SUBMITTER_ID) = (select CONTEXT, SUBMITTER_ID from ASSIGNMENT_SUBMISSION where SUBMISSION_ID = ?)
convert.1.select.validate.record=select XML from ASSIGNMENT_SUBMISSION where SUBMISSION_ID = ?
convert.1.update.record=update ASSIGNMENT_SUBMISSION set XML = ?, KEEP = 'T' where SUBMISSION_ID = ?
convert.2=RemoveDuplicateSubmissionAssignmentsConversion
convert.2.handler.class=org.sakaiproject.assignment.impl.conversion.impl.RemoveDuplicateSubmissionsConversionHandler
convert.2.create.migrate.table=create table assn_dupes_fsregister (id VARCHAR(99), STATUS VARCHAR(99))
convert.2.drop.migrate.table=drop table assn_dupes_fsregister
convert.2.check.migrate.table=select count(*) from assn_dupes_fsregister where status <> 'done'
convert.2.select.next.batch=select id from assn_dupes_fsregister where status =
'pending' and rownum <= 100
convert.2.complete.next.batch=update assn_dupes_fsregister set status = 'done' where id = ?
convert.2.mark.next.batch=update assn_dupes_fsregister set status = 'locked' where id = ?
convert.2.populate.migrate.table=insert into assn_dupes_fsregister (id,status) select SUBMISSION_ID,'pending' from ASSIGNMENT_SUBMISSION where (CONTEXT,SUBMITTER_ID) = any (select CONTEXT,SUBMITTER_ID from ASSIGNMENT_SUBMISSION group by CONTEXT,SUBMITTER_ID HAVING count(SUBMISSION_ID) > 1) and KEEP <> 'T'
convert.2.select.record=select SUBMISSION_ID from ASSIGNMENT_SUBMISSION where SUBMISSION_ID = ?
convert.2.select.validate.record=select SUBMISSION_ID from ASSIGNMENT_SUBMISSION where SUBMISSION_ID = ?
convert.2.update.record=delete from ASSIGNMENT_SUBMISSION where SUBMISSION_ID = ?