diff --git a/.sqlx/query-077307d1732e58c3fcf907816e4ae872d766925bdf85f87a0c26acea02e7b239.json b/.sqlx/query-077307d1732e58c3fcf907816e4ae872d766925bdf85f87a0c26acea02e7b239.json new file mode 100644 index 0000000..6e6916e --- /dev/null +++ b/.sqlx/query-077307d1732e58c3fcf907816e4ae872d766925bdf85f87a0c26acea02e7b239.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE mods SET latest_version = $1 WHERE id = $2", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "077307d1732e58c3fcf907816e4ae872d766925bdf85f87a0c26acea02e7b239" +} diff --git a/.sqlx/query-167e8da5ace0da8e91523ccc0083f37194c5dd030a0b56401138770495ea5725.json b/.sqlx/query-167e8da5ace0da8e91523ccc0083f37194c5dd030a0b56401138770495ea5725.json new file mode 100644 index 0000000..acba32f --- /dev/null +++ b/.sqlx/query-167e8da5ace0da8e91523ccc0083f37194c5dd030a0b56401138770495ea5725.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT DISTINCT m.id FROM mods m\n INNER JOIN mod_versions mv ON mv.mod_id = m.id\n WHERE m.id = $1 AND mv.validated = true", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false + ] + }, + "hash": "167e8da5ace0da8e91523ccc0083f37194c5dd030a0b56401138770495ea5725" +} diff --git a/.sqlx/query-1dab289f4e73713483b43887079957a6e93fc67e2ff5295a892f8968fba3f085.json b/.sqlx/query-1dab289f4e73713483b43887079957a6e93fc67e2ff5295a892f8968fba3f085.json new file mode 100644 index 0000000..1fd8f50 --- /dev/null +++ b/.sqlx/query-1dab289f4e73713483b43887079957a6e93fc67e2ff5295a892f8968fba3f085.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "INSERT INTO mods_developers (mod_id, developer_id)\n VALUES ($1, $2)", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "1dab289f4e73713483b43887079957a6e93fc67e2ff5295a892f8968fba3f085" +} diff --git a/.sqlx/query-20a03a1692dfc0938af04b430db7a2a34f6c595692fd9109d208890b66a903b5.json b/.sqlx/query-20a03a1692dfc0938af04b430db7a2a34f6c595692fd9109d208890b66a903b5.json new file mode 100644 index 0000000..8434812 --- /dev/null +++ b/.sqlx/query-20a03a1692dfc0938af04b430db7a2a34f6c595692fd9109d208890b66a903b5.json @@ -0,0 +1,34 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT id, username, display_name\n FROM developers WHERE github_user_id = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "username", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "display_name", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "20a03a1692dfc0938af04b430db7a2a34f6c595692fd9109d208890b66a903b5" +} diff --git a/.sqlx/query-2d32049425b12e11afd24a7cbdc7f4115fac9c3ba899accceada903cf7c5f4f2.json b/.sqlx/query-2d32049425b12e11afd24a7cbdc7f4115fac9c3ba899accceada903cf7c5f4f2.json deleted file mode 100644 index d3e1692..0000000 --- a/.sqlx/query-2d32049425b12e11afd24a7cbdc7f4115fac9c3ba899accceada903cf7c5f4f2.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT DISTINCT\n m.latest_version, m.about, m.changelog FROM mods m\n INNER JOIN mod_versions mv ON mv.mod_id = m.id\n WHERE m.id = $1 AND mv.validated = true", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "latest_version", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "about", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "changelog", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [ - false, - true, - true - ] - }, - "hash": "2d32049425b12e11afd24a7cbdc7f4115fac9c3ba899accceada903cf7c5f4f2" -} diff --git a/.sqlx/query-2e27c382a1f9fcff66602fd5fe5b1b3291bf0d13a290258192005760f315592a.json b/.sqlx/query-2e27c382a1f9fcff66602fd5fe5b1b3291bf0d13a290258192005760f315592a.json new file mode 100644 index 0000000..8bbb18d --- /dev/null +++ b/.sqlx/query-2e27c382a1f9fcff66602fd5fe5b1b3291bf0d13a290258192005760f315592a.json @@ -0,0 +1,46 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT d.id, d.username, d.display_name, d.verified, d.admin FROM developers d\n INNER JOIN auth_tokens at ON at.developer_id = d.id\n WHERE at.token = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "username", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "display_name", + "type_info": "Text" + }, + { + "ordinal": 3, + "name": "verified", + "type_info": "Bool" + }, + { + "ordinal": 4, + "name": "admin", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Uuid" + ] + }, + "nullable": [ + false, + false, + false, + false, + false + ] + }, + "hash": "2e27c382a1f9fcff66602fd5fe5b1b3291bf0d13a290258192005760f315592a" +} diff --git a/.sqlx/query-4fd002fad97ec295f679159483b39220feb05d9b8885ecfeb79a12532cbf7354.json b/.sqlx/query-4fd002fad97ec295f679159483b39220feb05d9b8885ecfeb79a12532cbf7354.json new file mode 100644 index 0000000..5b6750b --- /dev/null +++ b/.sqlx/query-4fd002fad97ec295f679159483b39220feb05d9b8885ecfeb79a12532cbf7354.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE mods_developers SET is_owner = false\n WHERE mod_id = $1", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [] + }, + "hash": "4fd002fad97ec295f679159483b39220feb05d9b8885ecfeb79a12532cbf7354" +} diff --git a/.sqlx/query-58c5c7b80a9b4fb733afabbff30bce3dd092c8b1b3b680fe95e17c30887c0f06.json b/.sqlx/query-58c5c7b80a9b4fb733afabbff30bce3dd092c8b1b3b680fe95e17c30887c0f06.json new file mode 100644 index 0000000..8a8dc22 --- /dev/null +++ b/.sqlx/query-58c5c7b80a9b4fb733afabbff30bce3dd092c8b1b3b680fe95e17c30887c0f06.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT mv.version, mv.id FROM mod_versions mv\n INNER JOIN mods m ON mv.mod_id = m.id\n WHERE m.id = $1\n ORDER BY mv.id DESC LIMIT 1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "version", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "id", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "58c5c7b80a9b4fb733afabbff30bce3dd092c8b1b3b680fe95e17c30887c0f06" +} diff --git a/.sqlx/query-5ff8966496bd2d76950a9a31980f8321b0577a8075c30c36e34c2fa2faa8c04b.json b/.sqlx/query-5ff8966496bd2d76950a9a31980f8321b0577a8075c30c36e34c2fa2faa8c04b.json new file mode 100644 index 0000000..d00d5a1 --- /dev/null +++ b/.sqlx/query-5ff8966496bd2d76950a9a31980f8321b0577a8075c30c36e34c2fa2faa8c04b.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "UPDATE mods_developers SET is_owner = true\n WHERE mod_id = $1 AND developer_id = $2", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "5ff8966496bd2d76950a9a31980f8321b0577a8075c30c36e34c2fa2faa8c04b" +} diff --git a/.sqlx/query-61f630cc2364cb1d71b6f5b58e221d2c1b936d83287ac328dcb20624c2cc03dd.json b/.sqlx/query-61f630cc2364cb1d71b6f5b58e221d2c1b936d83287ac328dcb20624c2cc03dd.json new file mode 100644 index 0000000..5132ff7 --- /dev/null +++ b/.sqlx/query-61f630cc2364cb1d71b6f5b58e221d2c1b936d83287ac328dcb20624c2cc03dd.json @@ -0,0 +1,52 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT dev.id, dev.username, dev.display_name, dev.verified, dev.admin, md.is_owner FROM developers dev\n INNER JOIN mods_developers md ON md.developer_id = dev.id WHERE md.mod_id = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "username", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "display_name", + "type_info": "Text" + }, + { + "ordinal": 3, + "name": "verified", + "type_info": "Bool" + }, + { + "ordinal": 4, + "name": "admin", + "type_info": "Bool" + }, + { + "ordinal": 5, + "name": "is_owner", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false + ] + }, + "hash": "61f630cc2364cb1d71b6f5b58e221d2c1b936d83287ac328dcb20624c2cc03dd" +} diff --git a/.sqlx/query-6278ed661667633ccddfd8fb6af5e48e9e4bd0e5204081abe41a1464c0c6b535.json b/.sqlx/query-6278ed661667633ccddfd8fb6af5e48e9e4bd0e5204081abe41a1464c0c6b535.json new file mode 100644 index 0000000..7130f27 --- /dev/null +++ b/.sqlx/query-6278ed661667633ccddfd8fb6af5e48e9e4bd0e5204081abe41a1464c0c6b535.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM mods_developers\n WHERE mod_id = $1 AND developer_id = $2", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "6278ed661667633ccddfd8fb6af5e48e9e4bd0e5204081abe41a1464c0c6b535" +} diff --git a/.sqlx/query-6dadc9e62145e52bb45a21ef7cffdff5d1126a5ec2513ad5f1f5f7971714c5a7.json b/.sqlx/query-6dadc9e62145e52bb45a21ef7cffdff5d1126a5ec2513ad5f1f5f7971714c5a7.json new file mode 100644 index 0000000..d254b94 --- /dev/null +++ b/.sqlx/query-6dadc9e62145e52bb45a21ef7cffdff5d1126a5ec2513ad5f1f5f7971714c5a7.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT id, name FROM mod_tags", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "name", + "type_info": "Text" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false + ] + }, + "hash": "6dadc9e62145e52bb45a21ef7cffdff5d1126a5ec2513ad5f1f5f7971714c5a7" +} diff --git a/.sqlx/query-74a8ad8da9121d864db3b38a0df52082349b104f6f50382325d4291ab10f3b82.json b/.sqlx/query-74a8ad8da9121d864db3b38a0df52082349b104f6f50382325d4291ab10f3b82.json new file mode 100644 index 0000000..e2de993 --- /dev/null +++ b/.sqlx/query-74a8ad8da9121d864db3b38a0df52082349b104f6f50382325d4291ab10f3b82.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT mod_tags.name, mods_mod_tags.mod_id FROM mod_tags\n INNER JOIN mods_mod_tags ON mod_tags.id = mods_mod_tags.tag_id\n WHERE mods_mod_tags.mod_id = ANY($1)", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "name", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "mod_id", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "TextArray" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "74a8ad8da9121d864db3b38a0df52082349b104f6f50382325d4291ab10f3b82" +} diff --git a/.sqlx/query-8d4d81d3a60f6998285f3b5267792cab13e6551dd51b1a5d200817ac14066be4.json b/.sqlx/query-8d4d81d3a60f6998285f3b5267792cab13e6551dd51b1a5d200817ac14066be4.json new file mode 100644 index 0000000..0b2f1c8 --- /dev/null +++ b/.sqlx/query-8d4d81d3a60f6998285f3b5267792cab13e6551dd51b1a5d200817ac14066be4.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT COUNT(*) FROM mods_developers\n WHERE developer_id = $1 AND mod_id = $2 AND is_owner = true", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "count", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int4", + "Text" + ] + }, + "nullable": [ + null + ] + }, + "hash": "8d4d81d3a60f6998285f3b5267792cab13e6551dd51b1a5d200817ac14066be4" +} diff --git a/.sqlx/query-949af1029499278e9e2d4a365ce7dcc0d29e53a866607b8dd313dab86cd1dfbc.json b/.sqlx/query-949af1029499278e9e2d4a365ce7dcc0d29e53a866607b8dd313dab86cd1dfbc.json new file mode 100644 index 0000000..8ec64b8 --- /dev/null +++ b/.sqlx/query-949af1029499278e9e2d4a365ce7dcc0d29e53a866607b8dd313dab86cd1dfbc.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT mv.version, mv.id FROM mod_versions mv\n INNER JOIN mods m ON mv.mod_id = m.id\n WHERE m.id = $1 AND mv.validated = true\n ORDER BY mv.id DESC LIMIT 1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "version", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "id", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "949af1029499278e9e2d4a365ce7dcc0d29e53a866607b8dd313dab86cd1dfbc" +} diff --git a/.sqlx/query-a96d5bb76e541418978b49ce79bb14628e2601c73db069a6e76f76421f7395d2.json b/.sqlx/query-a96d5bb76e541418978b49ce79bb14628e2601c73db069a6e76f76421f7395d2.json new file mode 100644 index 0000000..76b513d --- /dev/null +++ b/.sqlx/query-a96d5bb76e541418978b49ce79bb14628e2601c73db069a6e76f76421f7395d2.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT md.developer_id, md.is_owner FROM mods_developers md\n INNER JOIN mods m ON md.mod_id = m.id\n WHERE m.id = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "developer_id", + "type_info": "Int4" + }, + { + "ordinal": 1, + "name": "is_owner", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "a96d5bb76e541418978b49ce79bb14628e2601c73db069a6e76f76421f7395d2" +} diff --git a/.sqlx/query-d1121665a73084fe920c3cbd22a5ef5af234f3302ce2a26a55fea0e781042f0d.json b/.sqlx/query-d1121665a73084fe920c3cbd22a5ef5af234f3302ce2a26a55fea0e781042f0d.json new file mode 100644 index 0000000..6ae3fe1 --- /dev/null +++ b/.sqlx/query-d1121665a73084fe920c3cbd22a5ef5af234f3302ce2a26a55fea0e781042f0d.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT mod_id, tag_id FROM mods_mod_tags WHERE mod_id = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "mod_id", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "tag_id", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "d1121665a73084fe920c3cbd22a5ef5af234f3302ce2a26a55fea0e781042f0d" +} diff --git a/.sqlx/query-d3f5cc5729d842ba8c9a259592cdfa901fbbc2cc4c12fb3268d22aa0f6b76a64.json b/.sqlx/query-d3f5cc5729d842ba8c9a259592cdfa901fbbc2cc4c12fb3268d22aa0f6b76a64.json new file mode 100644 index 0000000..ec9b25c --- /dev/null +++ b/.sqlx/query-d3f5cc5729d842ba8c9a259592cdfa901fbbc2cc4c12fb3268d22aa0f6b76a64.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT mod_tags.name FROM mod_tags\n INNER JOIN mods_mod_tags ON mod_tags.id = mods_mod_tags.tag_id\n WHERE mods_mod_tags.mod_id = $1", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "name", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [ + false + ] + }, + "hash": "d3f5cc5729d842ba8c9a259592cdfa901fbbc2cc4c12fb3268d22aa0f6b76a64" +} diff --git a/.sqlx/query-efaadf3d6e55dae5e2f75a85d9402c7f33ab68cf0843f2dd244af4523855a3ee.json b/.sqlx/query-efaadf3d6e55dae5e2f75a85d9402c7f33ab68cf0843f2dd244af4523855a3ee.json new file mode 100644 index 0000000..0f61920 --- /dev/null +++ b/.sqlx/query-efaadf3d6e55dae5e2f75a85d9402c7f33ab68cf0843f2dd244af4523855a3ee.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "INSERT INTO mods_developers (mod_id, developer_id, is_owner) VALUES\n ($1, $2, true)", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "efaadf3d6e55dae5e2f75a85d9402c7f33ab68cf0843f2dd244af4523855a3ee" +} diff --git a/.sqlx/query-073fa455f6071709fcf51f8c8e4a5bced00a3cacd10dc4637e7df2acc2c7ddb4.json b/.sqlx/query-f5fbe652f94ea6a176ab47c8c82db3e668639fe9f2f48b5d82ca602408be9f9c.json similarity index 69% rename from .sqlx/query-073fa455f6071709fcf51f8c8e4a5bced00a3cacd10dc4637e7df2acc2c7ddb4.json rename to .sqlx/query-f5fbe652f94ea6a176ab47c8c82db3e668639fe9f2f48b5d82ca602408be9f9c.json index 1995183..7051010 100644 --- a/.sqlx/query-073fa455f6071709fcf51f8c8e4a5bced00a3cacd10dc4637e7df2acc2c7ddb4.json +++ b/.sqlx/query-f5fbe652f94ea6a176ab47c8c82db3e668639fe9f2f48b5d82ca602408be9f9c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "SELECT id, username, display_name, verified, github_user_id\n FROM developers WHERE github_user_id = $1", + "query": "SELECT id, username, display_name, verified, admin\n FROM developers WHERE LOWER(username) = $1", "describe": { "columns": [ { @@ -25,13 +25,13 @@ }, { "ordinal": 4, - "name": "github_user_id", - "type_info": "Int8" + "name": "admin", + "type_info": "Bool" } ], "parameters": { "Left": [ - "Int8" + "Text" ] }, "nullable": [ @@ -42,5 +42,5 @@ false ] }, - "hash": "073fa455f6071709fcf51f8c8e4a5bced00a3cacd10dc4637e7df2acc2c7ddb4" + "hash": "f5fbe652f94ea6a176ab47c8c82db3e668639fe9f2f48b5d82ca602408be9f9c" } diff --git a/.sqlx/query-fdb241626dcb300deb0e1ce4bd8e7acb2be3c5c029289817a88c8ea82472658d.json b/.sqlx/query-fdb241626dcb300deb0e1ce4bd8e7acb2be3c5c029289817a88c8ea82472658d.json new file mode 100644 index 0000000..dd8e18f --- /dev/null +++ b/.sqlx/query-fdb241626dcb300deb0e1ce4bd8e7acb2be3c5c029289817a88c8ea82472658d.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT COUNT(*) FROM mods_developers\n WHERE developer_id = $1 AND mod_id = $2", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "count", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int4", + "Text" + ] + }, + "nullable": [ + null + ] + }, + "hash": "fdb241626dcb300deb0e1ce4bd8e7acb2be3c5c029289817a88c8ea82472658d" +}