-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unreleased migrations directory
- Loading branch information
1 parent
94c2195
commit 6978317
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
...urces/ca/corefacility/bioinformatics/irida/database/changesets/unreleased/all-changes.xml
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,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<databaseChangeLog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"> | ||
</databaseChangeLog> |
12 changes: 12 additions & 0 deletions
12
...cility/bioinformatics/irida/database/changesets/unreleased/set-default-sample-objects.xml
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"> | ||
<changeSet id="set-default-sample-objects" author="deep"> | ||
<sql> | ||
UPDATE sample AS t, (SELECT * FROM sample s LEFT JOIN (SELECT id as sequencing_object_id, sample_id FROM sample_sequencingobject) sso ON sso.sample_id=s.id LEFT JOIN (select id as pair_id from sequence_file_pair) sfp ON sso.sequencing_object_id = sfp.pair_id WHERE s.id=t.id ORDER BY ISNULL(sfp.pair_id), sfp.pair_id ASC LIMIT 1) AS l SET t.default_sequencing_object=l.pair_id WHERE t.id=37 AND t.default_sequencing_object IS NULL; | ||
</sql> | ||
</changeSet> | ||
</databaseChangeLog> |