diff --git a/.sqlx/query-03d9706445455610fa20e5105996cff60667e0583b25c32bcdb835ff3516a386.json b/.sqlx/query-03d9706445455610fa20e5105996cff60667e0583b25c32bcdb835ff3516a386.json new file mode 100644 index 0000000..9ce4835 --- /dev/null +++ b/.sqlx/query-03d9706445455610fa20e5105996cff60667e0583b25c32bcdb835ff3516a386.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET verticalTextAlignment = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "03d9706445455610fa20e5105996cff60667e0583b25c32bcdb835ff3516a386" +} diff --git a/.sqlx/query-064f8f9fbcab0f1192865d505799080115f209f7c211fefdfa730cd95740a39c.json b/.sqlx/query-064f8f9fbcab0f1192865d505799080115f209f7c211fefdfa730cd95740a39c.json new file mode 100644 index 0000000..776aaf4 --- /dev/null +++ b/.sqlx/query-064f8f9fbcab0f1192865d505799080115f209f7c211fefdfa730cd95740a39c.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET title = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "064f8f9fbcab0f1192865d505799080115f209f7c211fefdfa730cd95740a39c" +} diff --git a/.sqlx/query-21f86a50febf92a8479b694df6199aa13275bf5d77cd509c6dfa8c58b563e58c.json b/.sqlx/query-21f86a50febf92a8479b694df6199aa13275bf5d77cd509c6dfa8c58b563e58c.json new file mode 100644 index 0000000..d0fefcc --- /dev/null +++ b/.sqlx/query-21f86a50febf92a8479b694df6199aa13275bf5d77cd509c6dfa8c58b563e58c.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET author = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "21f86a50febf92a8479b694df6199aa13275bf5d77cd509c6dfa8c58b563e58c" +} diff --git a/.sqlx/query-2f0d0e87173fc9885d6495bf53bb2d2498ab7a2dc6feb565b14ba3aa0858fba7.json b/.sqlx/query-2f0d0e87173fc9885d6495bf53bb2d2498ab7a2dc6feb565b14ba3aa0858fba7.json new file mode 100644 index 0000000..d538fb0 --- /dev/null +++ b/.sqlx/query-2f0d0e87173fc9885d6495bf53bb2d2498ab7a2dc6feb565b14ba3aa0858fba7.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET fontSize = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "2f0d0e87173fc9885d6495bf53bb2d2498ab7a2dc6feb565b14ba3aa0858fba7" +} diff --git a/.sqlx/query-42f529d74842286221074730a5c75f12eacdf6fb1328aa6292e457c0d361fca0.json b/.sqlx/query-42f529d74842286221074730a5c75f12eacdf6fb1328aa6292e457c0d361fca0.json new file mode 100644 index 0000000..beb5e70 --- /dev/null +++ b/.sqlx/query-42f529d74842286221074730a5c75f12eacdf6fb1328aa6292e457c0d361fca0.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "delete from songs where id = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "42f529d74842286221074730a5c75f12eacdf6fb1328aa6292e457c0d361fca0" +} diff --git a/.sqlx/query-644b32e47e3352a6496b13b7654bc082a4f8123da23181a0faa2d4d6da81f456.json b/.sqlx/query-644b32e47e3352a6496b13b7654bc082a4f8123da23181a0faa2d4d6da81f456.json new file mode 100644 index 0000000..650a43f --- /dev/null +++ b/.sqlx/query-644b32e47e3352a6496b13b7654bc082a4f8123da23181a0faa2d4d6da81f456.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET lyrics = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "644b32e47e3352a6496b13b7654bc082a4f8123da23181a0faa2d4d6da81f456" +} diff --git a/.sqlx/query-72ca964fb7cf078231b89b03068ea8abdb4fd505441b2504145634c0d2d2d51d.json b/.sqlx/query-72ca964fb7cf078231b89b03068ea8abdb4fd505441b2504145634c0d2d2d51d.json new file mode 100644 index 0000000..21072e8 --- /dev/null +++ b/.sqlx/query-72ca964fb7cf078231b89b03068ea8abdb4fd505441b2504145634c0d2d2d51d.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET background = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "72ca964fb7cf078231b89b03068ea8abdb4fd505441b2504145634c0d2d2d51d" +} diff --git a/.sqlx/query-7f6183cc2f81c8136b77561631eabb4daae801b811e91632b794a8ca45200793.json b/.sqlx/query-7f6183cc2f81c8136b77561631eabb4daae801b811e91632b794a8ca45200793.json new file mode 100644 index 0000000..f32ab64 --- /dev/null +++ b/.sqlx/query-7f6183cc2f81c8136b77561631eabb4daae801b811e91632b794a8ca45200793.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "INSERT into songs (vorder, fontSize, backgroundType, horizontalTextAlignment, verticalTextAlignment, title, font, background, lyrics, ccli, author, audio, id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 13 + }, + "nullable": [] + }, + "hash": "7f6183cc2f81c8136b77561631eabb4daae801b811e91632b794a8ca45200793" +} diff --git a/.sqlx/query-8c52f75b92c0fd65e69e9ef142c4edcbb007968316410bb94e8e233cf08a3553.json b/.sqlx/query-8c52f75b92c0fd65e69e9ef142c4edcbb007968316410bb94e8e233cf08a3553.json new file mode 100644 index 0000000..ddc2501 --- /dev/null +++ b/.sqlx/query-8c52f75b92c0fd65e69e9ef142c4edcbb007968316410bb94e8e233cf08a3553.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET horizontalTextAlignment = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "8c52f75b92c0fd65e69e9ef142c4edcbb007968316410bb94e8e233cf08a3553" +} diff --git a/.sqlx/query-b3c4641a31dd0bed71f9d90e53e22be3c4f9c61303ced7b7ab44e55c82882cab.json b/.sqlx/query-b3c4641a31dd0bed71f9d90e53e22be3c4f9c61303ced7b7ab44e55c82882cab.json new file mode 100644 index 0000000..f48825b --- /dev/null +++ b/.sqlx/query-b3c4641a31dd0bed71f9d90e53e22be3c4f9c61303ced7b7ab44e55c82882cab.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET vorder = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "b3c4641a31dd0bed71f9d90e53e22be3c4f9c61303ced7b7ab44e55c82882cab" +} diff --git a/.sqlx/query-c2dd5c2e44dbed87fa415ac666778dc21e2894deb30f89d4eca01793871587b3.json b/.sqlx/query-c2dd5c2e44dbed87fa415ac666778dc21e2894deb30f89d4eca01793871587b3.json new file mode 100644 index 0000000..e80db84 --- /dev/null +++ b/.sqlx/query-c2dd5c2e44dbed87fa415ac666778dc21e2894deb30f89d4eca01793871587b3.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET font = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "c2dd5c2e44dbed87fa415ac666778dc21e2894deb30f89d4eca01793871587b3" +} diff --git a/.sqlx/query-d315bf0e1a07881776ea76a2463dee01e28108db6fe0be27fd8339a612c83c7c.json b/.sqlx/query-d315bf0e1a07881776ea76a2463dee01e28108db6fe0be27fd8339a612c83c7c.json new file mode 100644 index 0000000..f1c9eb3 --- /dev/null +++ b/.sqlx/query-d315bf0e1a07881776ea76a2463dee01e28108db6fe0be27fd8339a612c83c7c.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET ccli = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "d315bf0e1a07881776ea76a2463dee01e28108db6fe0be27fd8339a612c83c7c" +} diff --git a/.sqlx/query-d6a937fa9c6d432e9d41b5cf845ab0059994f0ce3cd7c16f657aa9eb1e77e0bd.json b/.sqlx/query-d6a937fa9c6d432e9d41b5cf845ab0059994f0ce3cd7c16f657aa9eb1e77e0bd.json new file mode 100644 index 0000000..3d9efa3 --- /dev/null +++ b/.sqlx/query-d6a937fa9c6d432e9d41b5cf845ab0059994f0ce3cd7c16f657aa9eb1e77e0bd.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET backgroundType = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "d6a937fa9c6d432e9d41b5cf845ab0059994f0ce3cd7c16f657aa9eb1e77e0bd" +} diff --git a/.sqlx/query-eafd47ac0c3f5952e63f446a9228ad06967a62831adbac9ed5727a80e3f8cca8.json b/.sqlx/query-eafd47ac0c3f5952e63f446a9228ad06967a62831adbac9ed5727a80e3f8cca8.json new file mode 100644 index 0000000..11a1806 --- /dev/null +++ b/.sqlx/query-eafd47ac0c3f5952e63f446a9228ad06967a62831adbac9ed5727a80e3f8cca8.json @@ -0,0 +1,92 @@ +{ + "db_name": "SQLite", + "query": "SELECT vorder as \"verse_order!\", fontSize as \"font_size!: i32\", backgroundType as \"background_type!\", horizontalTextAlignment as \"horizontal_text_alignment!\", verticalTextAlignment as \"vertical_text_alignment!\", title as \"title!\", font as \"font!\", background as \"background!\", lyrics as \"lyrics!\", ccli as \"ccli!\", author as \"author!\", audio as \"audio!\", id as \"id: i32\" from songs", + "describe": { + "columns": [ + { + "name": "verse_order!", + "ordinal": 0, + "type_info": "Text" + }, + { + "name": "font_size!: i32", + "ordinal": 1, + "type_info": "Integer" + }, + { + "name": "background_type!", + "ordinal": 2, + "type_info": "Text" + }, + { + "name": "horizontal_text_alignment!", + "ordinal": 3, + "type_info": "Text" + }, + { + "name": "vertical_text_alignment!", + "ordinal": 4, + "type_info": "Text" + }, + { + "name": "title!", + "ordinal": 5, + "type_info": "Text" + }, + { + "name": "font!", + "ordinal": 6, + "type_info": "Text" + }, + { + "name": "background!", + "ordinal": 7, + "type_info": "Text" + }, + { + "name": "lyrics!", + "ordinal": 8, + "type_info": "Text" + }, + { + "name": "ccli!", + "ordinal": 9, + "type_info": "Text" + }, + { + "name": "author!", + "ordinal": 10, + "type_info": "Text" + }, + { + "name": "audio!", + "ordinal": 11, + "type_info": "Text" + }, + { + "name": "id: i32", + "ordinal": 12, + "type_info": "Integer" + } + ], + "parameters": { + "Right": 0 + }, + "nullable": [ + true, + true, + true, + true, + true, + false, + true, + true, + true, + true, + true, + true, + false + ] + }, + "hash": "eafd47ac0c3f5952e63f446a9228ad06967a62831adbac9ed5727a80e3f8cca8" +} diff --git a/.sqlx/query-eb2a3334642b1144cb4db350fcaada342fa7bd6ed0dd39df26c3ef9e951d8d02.json b/.sqlx/query-eb2a3334642b1144cb4db350fcaada342fa7bd6ed0dd39df26c3ef9e951d8d02.json new file mode 100644 index 0000000..18338b2 --- /dev/null +++ b/.sqlx/query-eb2a3334642b1144cb4db350fcaada342fa7bd6ed0dd39df26c3ef9e951d8d02.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "UPDATE songs SET audio = ?", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "eb2a3334642b1144cb4db350fcaada342fa7bd6ed0dd39df26c3ef9e951d8d02" +} diff --git a/src/rust/migrations/20240918_up.sql b/src/rust/migrations/20240918_up.sql new file mode 100644 index 0000000..ac01c92 --- /dev/null +++ b/src/rust/migrations/20240918_up.sql @@ -0,0 +1,58 @@ + +CREATE TABLE IF NOT EXISTS 'songs' ( +'id' INTEGER NOT NULL, +'title' TEXT NOT NULL, +'lyrics' TEXT, +'author' TEXT, +'ccli' TEXT, +'audio' TEXT, +'vorder' TEXT, +'background' TEXT, +'backgroundType' TEXT, +horizontalTextAlignment TEXT, +verticalTextAlignment TEXT, +font TEXT, +fontSize INTEGER, +PRIMARY KEY(id) +); + +CREATE TABLE IF NOT EXISTS 'videos' ( +'id' INTEGER NOT NULL, +'title' TEXT NOT NULL, +'filePath' TEXT NOT NULL, +startTime REAL, +endTime REAL, +loop BOOLEAN NOT NULL DEFAULT 0, +PRIMARY KEY(id) +); + +CREATE TABLE IF NOT EXISTS 'images' ( +'id' INTEGER NOT NULL, +'title' TEXT NOT NULL, +'filePath' TEXT NOT NULL, +PRIMARY KEY(id) +); + +CREATE TABLE IF NOT EXISTS 'presentations' ( +'id' INTEGER NOT NULL, +'title' TEXT NOT NULL, +'filePath' TEXT NOT NULL, +pageCount INTEGER DEFAULT 1, +html BOOLEAN NOT NULL DEFAULT 0, +PRIMARY KEY(id) +); + +ALTER TABLE songs +RENAME COLUMN horizontalTextAlignment TO horizontal_text_alignment; + +ALTER TABLE songs +RENAME COLUMN verticalTextAlignment TO vertical_text_alignment; + +ALTER TABLE songs +RENAME COLUMN vorder TO verse_order; + +ALTER TABLE songs +RENAME COLUMN backgroundType TO background_type; + +ALTER TABLE songs +RENAME COLUMN fontSize TO font_size;