forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upgradeschema_oracle.config
62 lines (58 loc) · 5.67 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
# UpgradeSchema Control File (Default)
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.count=3
convert.0.create.migrate.table.0=create table assn_submit_fsregister ( id varchar(99), status varchar(99) )
convert.0.create.migrate.table.1=create unique index uk_assn_submit_fsregister on assn_submit_fsregister(id)
convert.0.create.migrate.table.2=create index idx_assn_submit_fsregister_st on assn_submit_fsregister(status)
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.count=3
convert.1.create.migrate.table.0=create table assn_dupes_fsregister (id VARCHAR(99), STATUS VARCHAR(99))
convert.1.create.migrate.table.1=create unique index uk_assn_dupes_fsregister on assn_dupes_fsregister(id)
convert.1.create.migrate.table.2=create index idx_assn_dupes_fsregister_st on assn_dupes_fsregister(status)
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' and 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 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 = ?, SUBMIT_TIME = ?, SUBMITTED = ?, GRADED = ?, KEEP = 'T' where SUBMISSION_ID = ?
convert.2=RemoveDuplicateSubmissionAssignmentsConversion
convert.2.handler.class=org.sakaiproject.assignment.impl.conversion.impl.RemoveDuplicateSubmissionsConversionHandler
convert.2.create.migrate.table.count=3
convert.2.create.migrate.table.0=create table assn_dupes_fsregister (id VARCHAR(99), STATUS VARCHAR(99))
convert.2.create.migrate.table.1=create unique index uk_assn_dupes_fsregister on assn_dupes_fsregister(id)
convert.2.create.migrate.table.2=create index idx_assn_dupes_fsregister_st on assn_dupes_fsregister(status)
convert.2.drop.migrate.table.count=7
convert.2.drop.migrate.table.0=drop table assn_dupes_fsregister
convert.2.drop.migrate.table.1=CREATE UNIQUE INDEX ASN_SUB_SUB_INDEX ON ASSIGNMENT_SUBMISSION(CONTEXT,SUBMITTER_ID)
convert.2.drop.migrate.table.2=alter table ASSIGNMENT_SUBMISSION drop column keep
convert.2.drop.migrate.table.3=DELETE FROM ASSIGNMENT_SUBMISSION WHERE CONTEXT IS NULL
convert.2.drop.migrate.table.4=DELETE FROM ASSIGNMENT_SUBMISSION WHERE SUBMITTER_ID IS NULL
convert.2.drop.migrate.table.5=ALTER TABLE ASSIGNMENT_SUBMISSION MODIFY CONTEXT NOT NULL
convert.2.drop.migrate.table.6=ALTER TABLE ASSIGNMENT_SUBMISSION MODIFY SUBMITTER_ID NOT NULL
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 = ?