forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix to SAK-11821:added two config file for Oracle and MySQL configura…
…tion. User will need to use the file name as the argumenet for running the conversion script git-svn-id: https://source.sakaiproject.org/svn/assignment/trunk@37172 66ffb92e-73f9-0310-93c1-f5514f145a0a
- Loading branch information
Showing
6 changed files
with
110 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
...-impl/impl/src/java/org/sakaiproject/assignment/impl/conversion/impl/upgradeschema.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# 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 | ||
|
||
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=show columns from ASSIGNMENT_SUBMISSION like '<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' limit 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' limit 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.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' limit 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 = ? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# 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 = ? | ||
|