Skip to content

Commit

Permalink
Added unreleased migrations directory
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsidhu85 committed Oct 13, 2023
1 parent 94c2195 commit 6978317
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
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>
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>

0 comments on commit 6978317

Please sign in to comment.