Convert to liquibase from handrolled migration tool
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<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">
|
||||
<property name="binary_type" dbms="hsqldb" value="binary" />
|
||||
<property name="binary_type" value="blob" />
|
||||
<property name="curr_date_expr" value="current_timestamp" />
|
||||
<property name="varchar_type" dbms="mysql" value="varchar(${varcharLimit})" />
|
||||
<property name="varchar_type" value="varchar" />
|
||||
<include file="legacy/legacy-changelog.xml" relativeToChangelogFile="true"/>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,31 @@
|
||||
<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">
|
||||
<include file="schema25.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema26.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema27.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema28.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema29.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema30.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema31.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema32.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema33.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema34.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema35.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema36.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema37.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema38.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema40.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema43.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema45.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema46.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema47.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema49.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema50.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema51.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema52.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema53.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema61.xml" relativeToChangelogFile="true"/>
|
||||
<include file="schema62.xml" relativeToChangelogFile="true"/>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,131 @@
|
||||
<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="schema25_001" author="muff1nman" dbms="hsqldb">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="version" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<sql>set property "hsqldb.cache_file_scale" 8</sql>
|
||||
<rollback/>
|
||||
</changeSet>
|
||||
<changeSet id="schema25_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="version" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="version">
|
||||
<column name="version" type="int">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<insert tableName="version" >
|
||||
<column name="version" valueNumeric="1" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<dropTable tableName="version" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema25_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="role" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="role">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="1" />
|
||||
<column name="name" value="admin"/>
|
||||
</insert>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="2" />
|
||||
<column name="name" value="download"/>
|
||||
</insert>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="3" />
|
||||
<column name="name" value="upload"/>
|
||||
</insert>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="4" />
|
||||
<column name="name" value="playlist"/>
|
||||
</insert>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="5" />
|
||||
<column name="name" value="coverart"/>
|
||||
</insert>
|
||||
<rollback>
|
||||
<dropTable tableName="role" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema25_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="user" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="user">
|
||||
<column name="username" type="${varchar_type}">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="password" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<insert tableName="user">
|
||||
<column name="username" value="admin"/>
|
||||
<column name="password" value="admin"/>
|
||||
</insert>
|
||||
<rollback>
|
||||
<dropTable tableName="user" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema25_005" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="user_role" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="user_role">
|
||||
<column name="username" type="${varchar_type}">
|
||||
<constraints nullable="false" foreignKeyName="ur_u_fk" referencedTableName="user" referencedColumnNames="username"/>
|
||||
</column>
|
||||
<column name="role_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="ur_r_fk" referencedTableName="role" referencedColumnNames="id"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addPrimaryKey tableName="user_role" columnNames="username,role_id" />
|
||||
<insert tableName="user_role">
|
||||
<column name="username" value="admin"/>
|
||||
<column name="role_id" valueNumeric="1" />
|
||||
</insert>
|
||||
<insert tableName="user_role">
|
||||
<column name="username" value="admin"/>
|
||||
<column name="role_id" valueNumeric="2" />
|
||||
</insert>
|
||||
<insert tableName="user_role">
|
||||
<column name="username" value="admin"/>
|
||||
<column name="role_id" valueNumeric="3" />
|
||||
</insert>
|
||||
<insert tableName="user_role">
|
||||
<column name="username" value="admin"/>
|
||||
<column name="role_id" valueNumeric="4" />
|
||||
</insert>
|
||||
<insert tableName="user_role">
|
||||
<column name="username" value="admin"/>
|
||||
<column name="role_id" valueNumeric="5" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<dropTable tableName="user_role" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,163 @@
|
||||
<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="schema26_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 2</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="2" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 2</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema26_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="music_folder" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="music_folder">
|
||||
<column name="id" type="int" autoIncrement="true" >
|
||||
<constraints primaryKey="true" nullable="false" />
|
||||
</column>
|
||||
<column name="path" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="enabled" type="boolean" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<insert tableName="music_folder">
|
||||
<column name="path" value="${defaultMusicFolder}"/>
|
||||
<column name="name" value="Music"/>
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<dropTable tableName="music_folder" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema26_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="music_file_info" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="music_file_info">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="path" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="rating" type="int" />
|
||||
<column name="comment" type="${varchar_type}" />
|
||||
<column name="play_count" type="int" />
|
||||
<column name="last_played" type="datetime" />
|
||||
</createTable>
|
||||
<createIndex tableName="music_file_info" indexName="idx_music_file_info_path">
|
||||
<column name="path"/>
|
||||
</createIndex>
|
||||
<rollback>
|
||||
<dropTable tableName="music_file_info" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema26_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="internet_radio" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="internet_radio">
|
||||
<column name="id" type="int" autoIncrement="true" >
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="stream_url" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="homepage_url" type="${varchar_type}" />
|
||||
<column name="enabled" type="boolean" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<rollback>
|
||||
<dropTable tableName="internet_radio" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema26_005" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="player" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="player">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" />
|
||||
<column name="type" type="${varchar_type}" />
|
||||
<column name="username" type="${varchar_type}" />
|
||||
<column name="ip_address" type="${varchar_type}" />
|
||||
<column name="auto_control_enabled" type="boolean" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="last_seen" type="datetime" />
|
||||
<column name="cover_art_scheme" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="transcode_scheme" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<rollback>
|
||||
<dropTable tableName="player" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema26_006" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="player" columnName="dynamic_ip" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="player">
|
||||
<column name="dynamic_ip" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
<rollback>
|
||||
<dropColumn tableName="player" columnName="dynamic_ip"/>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema26_007" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from role where id = 6</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="6"/>
|
||||
<column name="name" value="comment" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into user_role(username, role_id)
|
||||
select distinct u.username, 6 from ${userTableQuote}user${userTableQuote} u, user_role ur
|
||||
where u.username = ur.username and ur.role_id in (1, 5)
|
||||
</sql>
|
||||
<rollback>
|
||||
<delete tableName="user_role" >
|
||||
<where>role_id = 6</where>
|
||||
</delete>
|
||||
<delete tableName="role">
|
||||
<where>id = 6</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,37 @@
|
||||
<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">
|
||||
<!-- Note that music_file_info.path case insensitive change was ignored -->
|
||||
<changeSet id="schema27_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 3</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="3" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 3</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema27_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user" columnName="bytes_streamed" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user">
|
||||
<column name="bytes_streamed" type="bigint" defaultValueNumeric="0">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="bytes_downloaded" type="bigint" defaultValueNumeric="0">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="bytes_uploaded" type="bigint" defaultValueNumeric="0">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,232 @@
|
||||
<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="schema28_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 4</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="4" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 4</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema28_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="user_settings" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="user_settings">
|
||||
<column name="username" type="${varchar_type}">
|
||||
<constraints primaryKey="true" foreignKeyName="us_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true"/>
|
||||
</column>
|
||||
<column name="locale" type="${varchar_type}" />
|
||||
<column name="theme_id" type="${varchar_type}" />
|
||||
<column name="final_version_notification" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="beta_version_notification" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_caption_cutoff" type="int" defaultValueNumeric="35" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_track_number" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_artist" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_album" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_genre" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_year" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_bit_rate" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_duration" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_format" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="main_file_size" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_caption_cutoff" type="int" defaultValueNumeric="35" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_track_number" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_artist" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_album" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_genre" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_year" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_bit_rate" type="boolean" defaultValueBoolean="false" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_duration" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_format" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="playlist_file_size" type="boolean" defaultValueBoolean="true" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<rollback>
|
||||
<dropTable tableName="user_settings" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema28_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="transcoding" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="transcoding">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="source_format" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="target_format" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="step1" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="step2" type="${varchar_type}" />
|
||||
<column name="step3" type="${varchar_type}" />
|
||||
<column name="enabled" type="boolean" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="wav > mp3"/>
|
||||
<column name="source_format" value="wav" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="flac > mp3"/>
|
||||
<column name="source_format" value="flac" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="ogg > mp3"/>
|
||||
<column name="source_format" value="ogg" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="wma > mp3"/>
|
||||
<column name="source_format" value="wma" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="m4a > mp3"/>
|
||||
<column name="source_format" value="m4a" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="false" />
|
||||
</insert>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="aac > mp3"/>
|
||||
<column name="source_format" value="aac" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="false" />
|
||||
</insert>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="ape > mp3"/>
|
||||
<column name="source_format" value="ape" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="mpc > mp3"/>
|
||||
<column name="source_format" value="mpc" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="mv > mp3"/>
|
||||
<column name="source_format" value="mv" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="shn > mp3"/>
|
||||
<column name="source_format" value="shn" />
|
||||
<column name="target_format" value="mp3"/>
|
||||
<column name="step1" value="ffmpeg -i %s -v 0 -f wav -" />
|
||||
<column name="step2" value="lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<dropTable tableName="transcoding" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema28_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="player_transcoding" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="player_transcoding">
|
||||
<column name="player_id" type="int">
|
||||
<constraints nullable="false" foreignKeyName="pt_p_fk" referencedTableName="player" referencedColumnNames="id" deleteCascade="true"/>
|
||||
</column>
|
||||
<column name="transcoding_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="pt_t_fk" referencedTableName="transcoding" referencedColumnNames="id" deleteCascade="true"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addPrimaryKey tableName="player_transcoding" columnNames="player_id,transcoding_id" />
|
||||
<rollback>
|
||||
<dropTable tableName="player_transcoding" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,44 @@
|
||||
<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="schema29_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 5</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="5" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 5</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema29_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="user_rating" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="user_rating">
|
||||
<column name="username" type="${varchar_type}">
|
||||
<constraints nullable="false" foreignKeyName="ura_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true"/>
|
||||
</column>
|
||||
<column name="path" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="rating" type="double" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<addPrimaryKey tableName="user_rating" columnNames="username,path" />
|
||||
<sql>
|
||||
insert into user_rating select 'admin', path, rating from music_file_info
|
||||
where rating is not null and rating > 0
|
||||
</sql>
|
||||
<rollback>
|
||||
<dropTable tableName="user_rating" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,44 @@
|
||||
<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="schema30_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 6</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="6" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 6</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema30_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="last_fm_enabled" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="last_fm_enabled" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="last_fm_username" type="${varchar_type}" />
|
||||
<column name="last_fm_password" type="${varchar_type}" />
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema30_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="transcode_scheme" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="transcode_scheme" type="${varchar_type}" defaultValue="OFF">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,42 @@
|
||||
<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="schema31_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 7</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="7" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 7</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema31_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="music_file_info" columnName="enabled" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="music_file_info">
|
||||
<column name="enabled" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema31_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="transcoding" columnName="default_active" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="transcoding">
|
||||
<column name="default_active" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,120 @@
|
||||
<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="schema32_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 8</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="8" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 8</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema32_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="show_now_playing" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="show_now_playing" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema32_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="selected_music_folder_id" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="selected_music_folder_id" type="int" defaultValueNumeric="-1">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema32_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="podcast_channel" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="podcast_channel">
|
||||
<column name="id" type="int" autoIncrement="true" >
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="url" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="title" type="${varchar_type}" />
|
||||
<column name="description" type="${varchar_type}" />
|
||||
<column name="status" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="error_message" type="${varchar_type}" />
|
||||
</createTable>
|
||||
<rollback>
|
||||
<dropTable tableName="podcast_channel" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema32_005" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="podcast_episode"/>
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="podcast_episode">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="channel_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="pe_pc_fk" referencedTableName="podcast_channel" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="url" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="path" type="${varchar_type}" />
|
||||
<column name="title" type="${varchar_type}" />
|
||||
<column name="description" type="${varchar_type}" />
|
||||
<column name="publish_date" type="datetime" />
|
||||
<column name="duration" type="${varchar_type}" />
|
||||
<column name="bytes_total" type="bigint" />
|
||||
<column name="bytes_downloaded" type="bigint" />
|
||||
<column name="status" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="error_message" type="${varchar_type}" />
|
||||
</createTable>
|
||||
<rollback>
|
||||
<dropTable tableName="podcast_episode" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema32_006" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from role where id = 7</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="7"/>
|
||||
<column name="name" value="podcast" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into user_role(username, role_id)
|
||||
select distinct u.username, 7 from ${userTableQuote}user${userTableQuote} u, user_role ur
|
||||
where u.username = ur.username and ur.role_id = 1
|
||||
</sql>
|
||||
<rollback>
|
||||
<delete tableName="user_role">
|
||||
<where>role_id = 7</where>
|
||||
</delete>
|
||||
<delete tableName="role">
|
||||
<where>id = 7</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,30 @@
|
||||
<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="schema33_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 9</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="9" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 9</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema33_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="player" columnName="client_side_playlist" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="player">
|
||||
<column name="client_side_playlist" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,42 @@
|
||||
<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="schema34_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 10</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="10" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 10</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema34_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user" columnName="ldap_authenticated" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user">
|
||||
<column name="ldap_authenticated" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema34_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="party_mode_enabled" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="party_mode_enabled" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,945 @@
|
||||
<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="schema35_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 11</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="11" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 11</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="now_playing_allowed" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="now_playing_allowed" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="web_player_default" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="web_player_default" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from role where id = 8</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="8"/>
|
||||
<column name="name" value="stream" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into user_role(username, role_id) select distinct u.username, 8 from ${userTableQuote}user${userTableQuote} u
|
||||
</sql>
|
||||
<rollback>
|
||||
<delete tableName="user_role" >
|
||||
<where>role_id = 8</where>
|
||||
</delete>
|
||||
<delete tableName="role">
|
||||
<where>id = 8</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_005" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="system_avatar" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="system_avatar">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" />
|
||||
<column name="created_date" type="datetime" defaultValueComputed="${curr_date_expr}">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="mime_type" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="width" type="int" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="height" type="int" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="data" type="${binary_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<rollback>
|
||||
<dropTable tableName="system_avatar" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_006" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="custom_avatar" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="custom_avatar">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}"/>
|
||||
<column name="created_date" type="datetime" defaultValueComputed="${curr_date_expr}">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="mime_type" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="width" type="int" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="height" type="int" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="data" type="${binary_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" deleteCascade="true" foreignKeyName="ca_u_fk" referencedTableName="user" referencedColumnNames="username" />
|
||||
</column>
|
||||
</createTable>
|
||||
<rollback>
|
||||
<dropTable tableName="custom_avatar" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_007" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="avatar_scheme" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="avatar_scheme" type="${varchar_type}" defaultValue="NONE">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_008" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="system_avatar_id" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="system_avatar_id" type="int">
|
||||
<constraints foreignKeyName="us_sai_fk" referencedTableName="system_avatar" referencedColumnNames="id" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_009" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="player" columnName="jukebox" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="player">
|
||||
<column name="jukebox" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Formal" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Formal'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Formal" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Formal.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Formal'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Engineer" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Engineer'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Engineer" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Engineer.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Engineer'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Footballer" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Footballer'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Footballer" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Footballer.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Footballer'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Green-Boy" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Green-Boy'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Green-Boy" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Green-Boy.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Green-Boy'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Linux-Zealot" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Linux-Zealot'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Linux-Zealot" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Linux-Zealot.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Linux-Zealot'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Mac-Zealot" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Mac-Zealot'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Mac-Zealot" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Mac-Zealot.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Mac-Zealot'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Windows-Zealot" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Windows-Zealot'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Windows-Zealot" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Windows-Zealot.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Windows-Zealot'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Army-Officer" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Army-Officer'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Army-Officer" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Army-Officer.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Army-Officer'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Beatnik" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Beatnik'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Beatnik" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Beatnik.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Beatnik'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_All-Caps" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'All-Caps'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="All-Caps" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/All-Caps.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'All-Caps'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Clown" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Clown'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Clown" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Clown.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Clown'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Commie-Pinko" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Commie-Pinko'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Commie-Pinko" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Commie-Pinko.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Commie-Pinko'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Forum-Flirt" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Forum-Flirt'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Forum-Flirt" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Forum-Flirt.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Forum-Flirt'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Gamer" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Gamer'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Gamer" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Gamer.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Gamer'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Hopelessly-Addicted" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Hopelessly-Addicted'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Hopelessly-Addicted" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Hopelessly-Addicted.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Hopelessly-Addicted'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Jekyll-And-Hyde" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Jekyll-And-Hyde'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Jekyll-And-Hyde" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Jekyll-And-Hyde.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Jekyll-And-Hyde'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Joker" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Joker'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Joker" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Joker.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Joker'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Lurker" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Lurker'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Lurker" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Lurker.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Lurker'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Moderator" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Moderator'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Moderator" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Moderator.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Moderator'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Newbie" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Newbie'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Newbie" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Newbie.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Newbie'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_No-Dissent" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'No-Dissent'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="No-Dissent" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/No-Dissent.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'No-Dissent'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Performer" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Performer'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Performer" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Performer.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Performer'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Push-My-Button" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Push-My-Button'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Push-My-Button" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Push-My-Button.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Push-My-Button'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Ray-Of-Sunshine" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Ray-Of-Sunshine'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Ray-Of-Sunshine" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Ray-Of-Sunshine.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Ray-Of-Sunshine'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Red-Hot-Chili-Peppers-1" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Red-Hot-Chili-Peppers-1'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Red-Hot-Chili-Peppers-1" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Red-Hot-Chili-Peppers-1.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Red-Hot-Chili-Peppers-1'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Red-Hot-Chili-Peppers-2" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Red-Hot-Chili-Peppers-2'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Red-Hot-Chili-Peppers-2" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Red-Hot-Chili-Peppers-2.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Red-Hot-Chili-Peppers-2'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Red-Hot-Chili-Peppers-3" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Red-Hot-Chili-Peppers-3'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Red-Hot-Chili-Peppers-3" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Red-Hot-Chili-Peppers-3.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Red-Hot-Chili-Peppers-3'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Red-Hot-Chili-Peppers-4" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Red-Hot-Chili-Peppers-4'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Red-Hot-Chili-Peppers-4" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Red-Hot-Chili-Peppers-4.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Red-Hot-Chili-Peppers-4'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Ringmaster" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Ringmaster'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Ringmaster" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Ringmaster.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Ringmaster'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Rumor-Junkie" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Rumor-Junkie'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Rumor-Junkie" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Rumor-Junkie.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Rumor-Junkie'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Sozzled-Surfer" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Sozzled-Surfer'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Sozzled-Surfer" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Sozzled-Surfer.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Sozzled-Surfer'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Statistician" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Statistician'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Statistician" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Statistician.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Statistician'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Tech-Support" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Tech-Support'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Tech-Support" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Tech-Support.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Tech-Support'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_The-Guru" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'The-Guru'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="The-Guru" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/The-Guru.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'The-Guru'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_The-Referee" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'The-Referee'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="The-Referee" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/The-Referee.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'The-Referee'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Troll" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Troll'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Troll" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Troll.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Troll'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Uptight" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Uptight'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Uptight" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Uptight.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Uptight'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Fire-Guitar" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Fire-Guitar'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Fire-Guitar" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Fire-Guitar.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Fire-Guitar'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Drum" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Drum'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Drum" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Drum.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Drum'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Headphones" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Headphones'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Headphones" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Headphones.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Headphones'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Mic" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Mic'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Mic" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Mic.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Mic'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Turntable" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Turntable'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Turntable" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Turntable.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Turntable'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Vinyl" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Vinyl'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Vinyl" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Vinyl.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Vinyl'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Cool" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Cool'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Cool" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Cool.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Cool'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Laugh" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Laugh'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Laugh" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Laugh.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Laugh'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema35_010_Study" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from system_avatar where name = 'Study'</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="system_avatar">
|
||||
<column name="name" value="Study" />
|
||||
<column name="mime_type" value="img/png" />
|
||||
<column name="width" valueNumeric="48" />
|
||||
<column name="height" valueNumeric="48" />
|
||||
<column name="data" valueBlobFile="../../org/libresonic/player/dao/schema/Study.png" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="system_avatar">
|
||||
<where>name = 'Study'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,30 @@
|
||||
<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="schema36_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 12</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="12" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 12</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema36_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="player" columnName="technology" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="player">
|
||||
<column name="technology" type="${varchar_type}" defaultValue="WEB">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,81 @@
|
||||
<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">
|
||||
<property name="curr_date_expr" value="current_timestamp" />
|
||||
<changeSet id="schema37_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 13</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="13" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 13</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema37_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from role where id = 9</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="9"/>
|
||||
<column name="name" value="settings" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into user_role(username, role_id) select distinct u.username, 9 from ${userTableQuote}user${userTableQuote} u
|
||||
</sql>
|
||||
<rollback />
|
||||
</changeSet>
|
||||
<changeSet id="schema37_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from role where id = 10</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="10"/>
|
||||
<column name="name" value="jukebox" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into user_role(username, role_id) select distinct u.username, 10 from ${userTableQuote}user${userTableQuote} u
|
||||
</sql>
|
||||
<rollback />
|
||||
</changeSet>
|
||||
<changeSet id="schema37_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="music_folder" columnName="changed" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="music_folder">
|
||||
<column name="changed" type="datetime" defaultValueComputed="${curr_date_expr}">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema37_005" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="internet_radio" columnName="changed" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="internet_radio">
|
||||
<column name="changed" type="datetime" defaultValueComputed="${curr_date_expr}">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema37_006" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="changed" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="changed" type="datetime" defaultValueComputed="${curr_date_expr}">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,40 @@
|
||||
<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="schema38_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 14</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="14" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 14</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema38_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="player" columnName="client_id" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="player">
|
||||
<column name="client_id" type="${varchar_type}"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema38_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="show_chat" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="show_chat" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,22 @@
|
||||
<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="schema40_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 15</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="15" />
|
||||
</insert>
|
||||
<!--Reset stream byte count since they have been wrong in earlier releases.-->
|
||||
<update tableName="user">
|
||||
<column name="bytes_streamed" valueNumeric="0" />
|
||||
</update>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 15</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,130 @@
|
||||
<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="schema43_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 16</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="16" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 16</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema43_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 17</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="17" />
|
||||
</insert>
|
||||
<delete tableName="transcoding">
|
||||
<where>target_format = 'flv' and source_format in ('avi', 'mpg', 'mpeg', 'mp4', 'm4v', 'mkv', 'mov', 'wmv', 'ogv')</where>
|
||||
</delete>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="avi > flv"/>
|
||||
<column name="source_format" value="avi" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'avi > flv'
|
||||
</sql>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="mpg > flv"/>
|
||||
<column name="source_format" value="mpg" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mpg > flv'
|
||||
</sql>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="mpeg > flv"/>
|
||||
<column name="source_format" value="mpeg" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mpeg > flv'
|
||||
</sql>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="mp4 > flv"/>
|
||||
<column name="source_format" value="mp4" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mp4 > flv'
|
||||
</sql>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="m4v > flv"/>
|
||||
<column name="source_format" value="m4v" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'm4v > flv'
|
||||
</sql>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="mkv > flv"/>
|
||||
<column name="source_format" value="mkv" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mkv > flv'
|
||||
</sql>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="mov > flv"/>
|
||||
<column name="source_format" value="mov" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'mov > flv'
|
||||
</sql>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="wmv > flv"/>
|
||||
<column name="source_format" value="wmv" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'wmv > flv'
|
||||
</sql>
|
||||
<insert tableName="transcoding">
|
||||
<column name="name" value="ogv > flv"/>
|
||||
<column name="source_format" value="ogv" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -" />
|
||||
<column name="enabled" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding(player_id, transcoding_id) select p.id as player_id, t.id as transaction_id from player p, transcoding t where t.name = 'ogv > flv'
|
||||
</sql>
|
||||
<rollback/>
|
||||
</changeSet>
|
||||
<changeSet id="schema43_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user" columnName="email" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user">
|
||||
<column name="email" type="${varchar_type}"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,84 @@
|
||||
<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="schema45_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 18</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="18" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 18</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema45_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from role where id = 11</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="role">
|
||||
<column name="id" valueNumeric="11"/>
|
||||
<column name="name" value="share" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into user_role(username, role_id)
|
||||
select distinct u.username, 11 from ${userTableQuote}user${userTableQuote} u, user_role ur
|
||||
where u.username = ur.username and ur.role_id = 1
|
||||
</sql>
|
||||
<rollback />
|
||||
</changeSet>
|
||||
<changeSet id="schema45_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="share" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="share">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="description" type="${varchar_type}" />
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" foreignKeyName="s_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true"/>
|
||||
</column>
|
||||
<column name="created" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="expires" type="datetime" />
|
||||
<column name="last_visited" type="datetime" />
|
||||
<column name="visit_count" type="int" defaultValueNumeric="0" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<createIndex unique="true" tableName="share" indexName="idx_share_name">
|
||||
<column name="name"/>
|
||||
</createIndex>
|
||||
<sql dbms="hsql">
|
||||
set table share type cached
|
||||
</sql>
|
||||
<createTable tableName="share_file">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="share_id" type="int">
|
||||
<constraints nullable="false" foreignKeyName="sf_s_fk" referencedTableName="share" referencedColumnNames="id" deleteCascade="true"/>
|
||||
</column>
|
||||
<column name="path" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<sql dbms="hsql">
|
||||
set table share_file type cached
|
||||
</sql>
|
||||
<rollback>
|
||||
<dropTable tableName="share" />
|
||||
<dropTable tableName="share_file" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,94 @@
|
||||
<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="schema46_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 19</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="19" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 19</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema46_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="transcoding2" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="transcoding2">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="source_formats" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="target_format" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="step1" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="step2" type="${varchar_type}" />
|
||||
<column name="step3" type="${varchar_type}" />
|
||||
</createTable>
|
||||
<insert tableName="transcoding2">
|
||||
<column name="name" value="mp3 audio" />
|
||||
<column name="source_formats" value="ogg oga aac m4a flac wav wma aif aiff ape mpc shn" />
|
||||
<column name="target_format" value="mp3" />
|
||||
<column name="step1" value="ffmpeg -i %s -ab %bk -v 0 -f mp3 -"/>
|
||||
</insert>
|
||||
<insert tableName="transcoding2">
|
||||
<column name="name" value="flv/h264 video" />
|
||||
<column name="source_formats" value="avi mpg mpeg mp4 m4v mkv mov wmv ogv divx m2ts" />
|
||||
<column name="target_format" value="flv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -async 1 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f flv -vcodec libx264 -preset superfast -threads 0 -"/>
|
||||
</insert>
|
||||
<rollback>
|
||||
<dropTable tableName="transcoding2" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema46_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="player_transcoding2" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="player_transcoding2">
|
||||
<column name="player_id" type="int">
|
||||
<constraints nullable="false" foreignKeyName="pt2_p_fk" referencedTableName="player" referencedColumnNames="id" deleteCascade="true"/>
|
||||
</column>
|
||||
<column name="transcoding_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="pt2_t_fk" referencedTableName="transcoding2" referencedColumnNames="id" deleteCascade="true"/>
|
||||
</column>
|
||||
</createTable>
|
||||
<addPrimaryKey tableName="player_transcoding2" columnNames="player_id,transcoding_id" />
|
||||
<sql>
|
||||
insert into player_transcoding2(player_id, transcoding_id)
|
||||
select distinct p.id, t.id from player p, transcoding2 t
|
||||
</sql>
|
||||
<rollback>
|
||||
<dropTable tableName="player_transcoding2" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema46_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="transcoding2" columnName="default_active" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="transcoding2">
|
||||
<column name="default_active" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,450 @@
|
||||
<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="schema47_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 20</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="20" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 20</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="media_file" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="media_file">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="path" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="folder" type="${varchar_type}" />
|
||||
<column name="type" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="format" type="${varchar_type}" />
|
||||
<column name="title" type="${varchar_type}" />
|
||||
<column name="album" type="${varchar_type}" />
|
||||
<column name="artist" type="${varchar_type}" />
|
||||
<column name="album_artist" type="${varchar_type}" />
|
||||
<column name="disc_number" type="int" />
|
||||
<column name="track_number" type="int" />
|
||||
<column name="year" type="int" />
|
||||
<column name="genre" type="${varchar_type}" />
|
||||
<column name="bit_rate" type="int" />
|
||||
<column name="variable_bit_rate" type="boolean" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="duration_seconds" type="int" />
|
||||
<column name="file_size" type="bigint" />
|
||||
<column name="width" type="int" />
|
||||
<column name="height" type="int" />
|
||||
<column name="cover_art_path" type="${varchar_type}" />
|
||||
<column name="parent_path" type="${varchar_type}" />
|
||||
<column name="play_count" type="int" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="last_played" type="datetime" />
|
||||
<column name="comment" type="${varchar_type}" />
|
||||
<column name="created" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="changed" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="last_scanned" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="children_last_updated" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="present" type="boolean" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="version" type="int" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<createIndex unique="true" tableName="media_file" indexName="idx_media_file_path">
|
||||
<column name="path"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_parent_path">
|
||||
<column name="parent_path"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_type">
|
||||
<column name="type"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_album">
|
||||
<column name="album"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_artist">
|
||||
<column name="artist"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_album_artist">
|
||||
<column name="album_artist"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_present">
|
||||
<column name="present"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_genre">
|
||||
<column name="genre"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_play_count">
|
||||
<column name="play_count"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_created">
|
||||
<column name="created"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="media_file" indexName="idx_media_file_last_played">
|
||||
<column name="last_played"/>
|
||||
</createIndex>
|
||||
<sql dbms="hsql">
|
||||
set table media_file type cached
|
||||
</sql>
|
||||
<rollback>
|
||||
<dropTable tableName="media_file" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="artist" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="artist">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="cover_art_path" type="${varchar_type}" />
|
||||
<column name="album_count" type="int" defaultValueNumeric="0">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="last_scanned" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="present" type="boolean" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<createIndex tableName="artist" indexName="idx_artist_name" unique="true">
|
||||
<column name="name"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="artist" indexName="idx_artist_present" >
|
||||
<column name="present"/>
|
||||
</createIndex>
|
||||
<sql dbms="hsql">
|
||||
set table artist type cached
|
||||
</sql>
|
||||
<rollback>
|
||||
<dropTable tableName="artist" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="album" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="album">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="path" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="artist" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="song_count" type="int" defaultValueNumeric="0" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="duration_seconds" type="int" defaultValueNumeric="0" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="cover_art_path" type="${varchar_type}" />
|
||||
<column name="play_count" type="int" defaultValueNumeric="0" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="last_played" type="datetime" />
|
||||
<column name="comment" type="${varchar_type}" />
|
||||
<column name="created" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="last_scanned" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="present" type="boolean" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<createIndex tableName="album" indexName="idx_album_artist_name" unique="true">
|
||||
<column name="artist" />
|
||||
<column name="name"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="album" indexName="idx_album_play_count" >
|
||||
<column name="play_count"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="album" indexName="idx_album_last_played" >
|
||||
<column name="last_played"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="album" indexName="idx_album_present" >
|
||||
<column name="present"/>
|
||||
</createIndex>
|
||||
<sql dbms="hsql">
|
||||
set table album type cached
|
||||
</sql>
|
||||
<rollback>
|
||||
<dropTable tableName="album" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_005" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<indexExists indexName="idx_album_name" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createIndex tableName="album" indexName="idx_album_name">
|
||||
<column name="name"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_006" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="starred_media_file" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="starred_media_file">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="media_file_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="smf_mf_fk" referencedTableName="media_file" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" foreignKeyName="smf_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="created" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<createIndex tableName="starred_media_file" indexName="idx_starred_media_file_media_file_id">
|
||||
<column name="media_file_id"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="starred_media_file" indexName="idx_starred_media_file_username">
|
||||
<column name="username"/>
|
||||
</createIndex>
|
||||
<addUniqueConstraint tableName="starred_media_file" columnNames="media_file_id,username" />
|
||||
<rollback>
|
||||
<dropTable tableName="starred_media_file" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_007" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="starred_album" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="starred_album">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="album_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="sa_a_fk" referencedTableName="album" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" foreignKeyName="sa_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="created" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<createIndex tableName="starred_album" indexName="idx_starred_album_album_id">
|
||||
<column name="album_id"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="starred_album" indexName="idx_starred_album_username">
|
||||
<column name="username"/>
|
||||
</createIndex>
|
||||
<addUniqueConstraint tableName="starred_album" columnNames="album_id,username" />
|
||||
<rollback>
|
||||
<dropTable tableName="starred_album" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_008" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="starred_artist" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="starred_artist">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="artist_id" type="int">
|
||||
<constraints nullable="false" foreignKeyName="sar_a_fk" referencedTableName="artist" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" foreignKeyName="sar_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="created" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<createIndex tableName="starred_artist" indexName="idx_starred_artist_artist_id">
|
||||
<column name="artist_id"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="starred_artist" indexName="idx_starred_artist_username">
|
||||
<column name="username"/>
|
||||
</createIndex>
|
||||
<addUniqueConstraint tableName="starred_artist" columnNames="artist_id,username" />
|
||||
<rollback>
|
||||
<dropTable tableName="starred_artist" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_009" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="playlist" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="playlist">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" foreignKeyName="p_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="is_public" type="boolean" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="name" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="comment" type="${varchar_type}" />
|
||||
<column name="file_count" type="int" defaultValueNumeric="0">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="duration_seconds" type="int" defaultValueNumeric="0" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="created" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="changed" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<rollback>
|
||||
<dropTable tableName="playlist" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_010" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="playlist" columnName="imported_from" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="playlist">
|
||||
<column name="imported_from" type="${varchar_type}"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_011" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="playlist_file" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="playlist_file">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="playlist_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="pf_p_fk" referencedTableName="playlist" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="media_file_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="pf_mf_fk" referencedTableName="media_file" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
</createTable>
|
||||
<sql dbms="hsql">
|
||||
set table playlist_file type cached
|
||||
</sql>
|
||||
<rollback>
|
||||
<dropTable tableName="playlist_file" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_012" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="playlist_user" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="playlist_user">
|
||||
<column name="id" type="int" autoIncrement="true" >
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="playlist_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="pu_p_fk" referencedTableName="playlist" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" foreignKeyName="pu_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true" />
|
||||
</column>
|
||||
</createTable>
|
||||
<addUniqueConstraint tableName="playlist_user" columnNames="playlist_id,username" />
|
||||
<rollback>
|
||||
<dropTable tableName="playlist_user" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema47_013" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="bookmark" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="bookmark">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="media_file_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="b_mf_fk" referencedTableName="media_file" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="position_millis" type="bigint" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" foreignKeyName="b_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="comment" type="${varchar_type}" />
|
||||
<column name="created" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="changed" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<createIndex tableName="bookmark" indexName="idx_bookmark_media_file_id">
|
||||
<column name="media_file_id"/>
|
||||
</createIndex>
|
||||
<createIndex tableName="bookmark" indexName="idx_bookmark_username">
|
||||
<column name="username"/>
|
||||
</createIndex>
|
||||
<addUniqueConstraint columnNames="media_file_id,username" tableName="bookmark" />
|
||||
<rollback>
|
||||
<dropTable tableName="bookmark" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,65 @@
|
||||
<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="schema49_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 21</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="21" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 21</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema49_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="album" columnName="year" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="album">
|
||||
<column name="year" type="int"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema49_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="album" columnName="genre" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="album">
|
||||
<column name="genre" type="${varchar_type}"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema49_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="genre" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="genre">
|
||||
<column name="name" type="${varchar_type}">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="song_count" type="int" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
<changeSet id="schema49_005" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="genre" columnName="album_count" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="genre">
|
||||
<column name="album_count" type="int" defaultValueNumeric="0">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,64 @@
|
||||
<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="schema50_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 22</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="22" />
|
||||
</insert>
|
||||
<insert tableName="transcoding2">
|
||||
<column name="name" value="mkv video"/>
|
||||
<column name="source_formats" value="avi mpg mpeg mp4 m4v mkv mov wmv ogv divx m2ts" />
|
||||
<column name="target_format" value="mkv" />
|
||||
<column name="step1" value="ffmpeg -ss %o -i %s -c:v libx264 -preset superfast -b:v %bk -c:a libvorbis -f matroska -threads 0 -" />
|
||||
<column name="default_active" valueBoolean="true" />
|
||||
</insert>
|
||||
<sql>
|
||||
insert into player_transcoding2(player_id, transcoding_id)
|
||||
select distinct p.id, t.id from player p, transcoding2 t where t.name='mkv video'
|
||||
</sql>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 22</where>
|
||||
</delete>
|
||||
<delete tableName="player_transcoding" >
|
||||
<where>transcoding_id in (select id from transcoding_2 where name = 'mkv video')</where>
|
||||
</delete>
|
||||
<delete tableName="transcoding2" >
|
||||
<where>name = 'mkv video'</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema50_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="song_notification" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="song_notification" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema50_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 23</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="23" />
|
||||
</insert>
|
||||
<update tableName="transcoding2">
|
||||
<column name="step1" value="ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 -" />
|
||||
<where>name='mp3 audio'</where>
|
||||
</update>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 23</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,54 @@
|
||||
<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="schema51_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 23</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="23" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 23</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema51_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="show_artist_info" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="show_artist_info" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema51_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="auto_hide_play_queue" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="auto_hide_play_queue" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema51_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="view_as_list" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="view_as_list" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,96 @@
|
||||
<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="schema52_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 24</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="24" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 24</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema52_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="music_folder_user" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="music_folder_user">
|
||||
<column name="music_folder_id" type="int">
|
||||
<constraints nullable="false" foreignKeyName="mfu_fm_fk" referencedTableName="music_folder" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" foreignKeyName="mfu_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true" />
|
||||
</column>
|
||||
</createTable>
|
||||
<createIndex tableName="music_folder_user" indexName="idx_music_folder_user_username">
|
||||
<column name="username"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
<changeSet id="schema52_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="album" columnName="folder_id"/>
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="album">
|
||||
<column name="folder_id" type="int"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema52_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="play_queue" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="play_queue">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="username" type="${varchar_type}" >
|
||||
<constraints nullable="false" foreignKeyName="pq_u_fk" referencedTableName="user" referencedColumnNames="username" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="current" type="int" />
|
||||
<column name="position_millis" type="bigint" />
|
||||
<column name="changed" type="datetime" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
<column name="changed_by" type="${varchar_type}" >
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</createTable>
|
||||
<rollback>
|
||||
<dropTable tableName="play_queue" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema52_005" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<tableExists tableName="play_queue_file" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createTable tableName="play_queue_file">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<constraints primaryKey="true" />
|
||||
</column>
|
||||
<column name="play_queue_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="pqf_pq_fk" referencedTableName="play_queue" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
<column name="media_file_id" type="int" >
|
||||
<constraints nullable="false" foreignKeyName="pqf_mf_fk" referencedTableName="media_file" referencedColumnNames="id" deleteCascade="true" />
|
||||
</column>
|
||||
</createTable>
|
||||
<sql dbms="hsql">
|
||||
set table play_queue_file type cached
|
||||
</sql>
|
||||
<rollback>
|
||||
<dropTable tableName="play_queue_file" />
|
||||
</rollback>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,84 @@
|
||||
<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="schema53_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 25</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="25" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 25</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema53_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<indexExists indexName="idx_podcast_episode_url" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<createIndex tableName="podcast_episode" indexName="idx_podcast_episode_url">
|
||||
<column name="url"/>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
<changeSet id="schema53_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="default_album_list" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="default_album_list" type="${varchar_type}" defaultValue="random">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema53_004" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="queue_following_songs" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="queue_following_songs" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema53_005" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="podcast_channel" columnName="image_url" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="podcast_channel">
|
||||
<column name="image_url" type="${varchar_type}" />
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema53_006" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="show_side_bar" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="show_side_bar" type="boolean" defaultValueBoolean="true">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema53_007" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="artist" columnName="folder_id" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="artist">
|
||||
<column name="folder_id" type="int"/>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,42 @@
|
||||
<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="schema61_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 26</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="26" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 26</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema61_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="list_reload_delay" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="list_reload_delay" type="int" defaultValueNumeric="60">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
<changeSet id="schema61_003" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="user_settings" columnName="keyboard_shortcuts_enabled" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="user_settings">
|
||||
<column name="keyboard_shortcuts_enabled" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false" />
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
@@ -0,0 +1,30 @@
|
||||
<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="schema62_001" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<sqlCheck expectedResult="0">select count(*) from version where version = 27</sqlCheck>
|
||||
</preConditions>
|
||||
<insert tableName="version">
|
||||
<column name="version" valueNumeric="27" />
|
||||
</insert>
|
||||
<rollback>
|
||||
<delete tableName="version" >
|
||||
<where>version = 27</where>
|
||||
</delete>
|
||||
</rollback>
|
||||
</changeSet>
|
||||
<changeSet id="schema62_002" author="muff1nman">
|
||||
<preConditions onFail="MARK_RAN">
|
||||
<not>
|
||||
<columnExists tableName="player" columnName="m3u_bom_enabled" />
|
||||
</not>
|
||||
</preConditions>
|
||||
<addColumn tableName="player">
|
||||
<column name="m3u_bom_enabled" type="boolean" defaultValueBoolean="false">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</addColumn>
|
||||
</changeSet>
|
||||
</databaseChangeLog>
|
||||
Reference in New Issue
Block a user