Merge remote-tracking branch 'origin/pr/1452'

master
Andrew DeMaria 5 years ago
commit 27c174a4d6
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 1
      airsonic-main/src/main/resources/liquibase/db-changelog.xml
  2. 28
      airsonic-main/src/main/resources/liquibase/legacy/schema35.xml

@ -3,6 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<property name="binary_type" dbms="hsqldb" value="binary" /> <property name="binary_type" dbms="hsqldb" value="binary" />
<property name="binary_type" dbms="postgresql" value="bytea" />
<property name="binary_type" value="blob" /> <property name="binary_type" value="blob" />
<property name="curr_date_expr" value="current_timestamp" /> <property name="curr_date_expr" value="current_timestamp" />
<property name="varchar_type" dbms="mariadb,mysql" value="varchar(${mysqlVarcharLimit})" /> <property name="varchar_type" dbms="mariadb,mysql" value="varchar(${mysqlVarcharLimit})" />

@ -59,6 +59,20 @@
</delete> </delete>
</rollback> </rollback>
</changeSet> </changeSet>
<changeSet id="schema35_005_fix_binary_type" author="fxthomas" dbms="postgresql">
<preConditions onFail="MARK_RAN">
<tableExists tableName="system_avatar" />
<sqlCheck expectedResult="oid">
SELECT DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'system_avatar'
AND COLUMN_NAME = 'data'
</sqlCheck>
</preConditions>
<!-- Kept for compatibility with people with an existing table using the workaround in #1213 -->
<sql>ALTER TABLE system_avatar ALTER COLUMN data TYPE bytea USING lo_get(data);</sql>
<rollback></rollback>
</changeSet>
<changeSet id="schema35_005" author="muff1nman"> <changeSet id="schema35_005" author="muff1nman">
<validCheckSum>8:d428266eb794ae2f1361a6eec0f67672</validCheckSum> <validCheckSum>8:d428266eb794ae2f1361a6eec0f67672</validCheckSum>
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
@ -91,6 +105,20 @@
<dropTable tableName="system_avatar" /> <dropTable tableName="system_avatar" />
</rollback> </rollback>
</changeSet> </changeSet>
<changeSet id="schema35_006_fix_binary_type" author="fxthomas" dbms="postgresql">
<preConditions onFail="MARK_RAN">
<tableExists tableName="custom_avatar" />
<sqlCheck expectedResult="oid">
SELECT DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'custom_avatar'
AND COLUMN_NAME = 'data'
</sqlCheck>
</preConditions>
<!-- Kept for compatibility with people with an existing table using the workaround in #1213 -->
<sql>ALTER TABLE custom_avatar ALTER COLUMN data TYPE bytea USING lo_get(data);</sql>
<rollback></rollback>
</changeSet>
<changeSet id="schema35_006" author="muff1nman"> <changeSet id="schema35_006" author="muff1nman">
<validCheckSum>8:60a4f99dea63d7813457a1b8f981f763</validCheckSum> <validCheckSum>8:60a4f99dea63d7813457a1b8f981f763</validCheckSum>
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">

Loading…
Cancel
Save