diff --git a/.sqlx/query-04345d9c23430267f755b1420520df91bd403524fd60ba1a94e3a239ea70cae7.json b/.sqlx/query-04345d9c23430267f755b1420520df91bd403524fd60ba1a94e3a239ea70cae7.json
deleted file mode 100644
index 1c31aaa7..00000000
--- a/.sqlx/query-04345d9c23430267f755b1420520df91bd403524fd60ba1a94e3a239ea70cae7.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n UPDATE mods\n SET source_url = $1\n WHERE (id = $2)\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Varchar",
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "04345d9c23430267f755b1420520df91bd403524fd60ba1a94e3a239ea70cae7"
-}
diff --git a/.sqlx/query-268af672e8e475885c18da9edd81bac19f3a78a8a462bf9bb2dbe0a72c2f1ff7.json b/.sqlx/query-268af672e8e475885c18da9edd81bac19f3a78a8a462bf9bb2dbe0a72c2f1ff7.json
new file mode 100644
index 00000000..aa5b4f46
--- /dev/null
+++ b/.sqlx/query-268af672e8e475885c18da9edd81bac19f3a78a8a462bf9bb2dbe0a72c2f1ff7.json
@@ -0,0 +1,16 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n INSERT INTO mods_links (\n joining_mod_id, joining_platform_id, url\n )\n SELECT * FROM UNNEST($1::bigint[], $2::int[], $3::varchar[])\n ",
+ "describe": {
+ "columns": [],
+ "parameters": {
+ "Left": [
+ "Int8Array",
+ "Int4Array",
+ "VarcharArray"
+ ]
+ },
+ "nullable": []
+ },
+ "hash": "268af672e8e475885c18da9edd81bac19f3a78a8a462bf9bb2dbe0a72c2f1ff7"
+}
diff --git a/.sqlx/query-2b8dafe9c3df9fd25235a13868e8e7607decfbe96a413cc576919a1fb510f269.json b/.sqlx/query-2b8dafe9c3df9fd25235a13868e8e7607decfbe96a413cc576919a1fb510f269.json
deleted file mode 100644
index c011c5b0..00000000
--- a/.sqlx/query-2b8dafe9c3df9fd25235a13868e8e7607decfbe96a413cc576919a1fb510f269.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n UPDATE mods\n SET discord_url = $1\n WHERE (id = $2)\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Varchar",
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "2b8dafe9c3df9fd25235a13868e8e7607decfbe96a413cc576919a1fb510f269"
-}
diff --git a/.sqlx/query-2efd0efe9ce16b2da01d9bcc1603e3a7ad0f9a1e5a457770608bc41dbb83f2dd.json b/.sqlx/query-2efd0efe9ce16b2da01d9bcc1603e3a7ad0f9a1e5a457770608bc41dbb83f2dd.json
deleted file mode 100644
index e666764f..00000000
--- a/.sqlx/query-2efd0efe9ce16b2da01d9bcc1603e3a7ad0f9a1e5a457770608bc41dbb83f2dd.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n INSERT INTO payouts_values (user_id, mod_id, amount, created)\n SELECT * FROM UNNEST ($1::bigint[], $2::bigint[], $3::numeric[], $4::timestamptz[])\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Int8Array",
- "Int8Array",
- "NumericArray",
- "TimestamptzArray"
- ]
- },
- "nullable": []
- },
- "hash": "2efd0efe9ce16b2da01d9bcc1603e3a7ad0f9a1e5a457770608bc41dbb83f2dd"
-}
diff --git a/.sqlx/query-4567790f0dc98ff20b596a33161d1f6ac8af73da67fe8c54192724626c6bf670.json b/.sqlx/query-4567790f0dc98ff20b596a33161d1f6ac8af73da67fe8c54192724626c6bf670.json
deleted file mode 100644
index 7893cca8..00000000
--- a/.sqlx/query-4567790f0dc98ff20b596a33161d1f6ac8af73da67fe8c54192724626c6bf670.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n DELETE FROM mods_donations\n WHERE joining_mod_id = $1\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "4567790f0dc98ff20b596a33161d1f6ac8af73da67fe8c54192724626c6bf670"
-}
diff --git a/.sqlx/query-473db826b691ae1131990ef0927cfe5b63d48829dd41edb7def22248d5668ac7.json b/.sqlx/query-473db826b691ae1131990ef0927cfe5b63d48829dd41edb7def22248d5668ac7.json
deleted file mode 100644
index de301423..00000000
--- a/.sqlx/query-473db826b691ae1131990ef0927cfe5b63d48829dd41edb7def22248d5668ac7.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n INSERT INTO mods_donations (\n joining_mod_id, joining_platform_id, url\n )\n SELECT * FROM UNNEST($1::bigint[], $2::int[], $3::varchar[])\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Int8Array",
- "Int4Array",
- "VarcharArray"
- ]
- },
- "nullable": []
- },
- "hash": "473db826b691ae1131990ef0927cfe5b63d48829dd41edb7def22248d5668ac7"
-}
diff --git a/.sqlx/query-4d0e2d4345aeab5ee7eed847c03c913073eeb43caaf299cddcac6e41351661fd.json b/.sqlx/query-4d0e2d4345aeab5ee7eed847c03c913073eeb43caaf299cddcac6e41351661fd.json
new file mode 100644
index 00000000..801c4326
--- /dev/null
+++ b/.sqlx/query-4d0e2d4345aeab5ee7eed847c03c913073eeb43caaf299cddcac6e41351661fd.json
@@ -0,0 +1,15 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n DELETE FROM mods_links\n WHERE joining_mod_id = $1 AND joining_platform_id IN (\n SELECT id FROM link_platforms WHERE name = ANY($2)\n )\n ",
+ "describe": {
+ "columns": [],
+ "parameters": {
+ "Left": [
+ "Int8",
+ "TextArray"
+ ]
+ },
+ "nullable": []
+ },
+ "hash": "4d0e2d4345aeab5ee7eed847c03c913073eeb43caaf299cddcac6e41351661fd"
+}
diff --git a/.sqlx/query-5db4b2678406a9977c1e37409920804e0225181befe8b784dea48e37e30fedcc.json b/.sqlx/query-5db4b2678406a9977c1e37409920804e0225181befe8b784dea48e37e30fedcc.json
new file mode 100644
index 00000000..0dcd2037
--- /dev/null
+++ b/.sqlx/query-5db4b2678406a9977c1e37409920804e0225181befe8b784dea48e37e30fedcc.json
@@ -0,0 +1,16 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n INSERT INTO mods_links (joining_mod_id, joining_platform_id, url)\n VALUES ($1, $2, $3)\n ",
+ "describe": {
+ "columns": [],
+ "parameters": {
+ "Left": [
+ "Int8",
+ "Int4",
+ "Varchar"
+ ]
+ },
+ "nullable": []
+ },
+ "hash": "5db4b2678406a9977c1e37409920804e0225181befe8b784dea48e37e30fedcc"
+}
diff --git a/.sqlx/query-07ebc9dc82cd012cd4f5880b1eb3d82602c195a3e3ddd557103ee037aa6dad1c.json b/.sqlx/query-5e7146bc9dc9145cf3d01875ee599ada89e28c63fd10b3f23680d6660d0e57a2.json
similarity index 55%
rename from .sqlx/query-07ebc9dc82cd012cd4f5880b1eb3d82602c195a3e3ddd557103ee037aa6dad1c.json
rename to .sqlx/query-5e7146bc9dc9145cf3d01875ee599ada89e28c63fd10b3f23680d6660d0e57a2.json
index 3f89936b..689e6395 100644
--- a/.sqlx/query-07ebc9dc82cd012cd4f5880b1eb3d82602c195a3e3ddd557103ee037aa6dad1c.json
+++ b/.sqlx/query-5e7146bc9dc9145cf3d01875ee599ada89e28c63fd10b3f23680d6660d0e57a2.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n INSERT INTO mods_donations (joining_mod_id, joining_platform_id, url)\n VALUES ($1, $2, $3)\n ",
+ "query": "\n INSERT INTO mods_links (joining_mod_id, joining_platform_id, url)\n VALUES ($1, $2, $3)\n ",
"describe": {
"columns": [],
"parameters": {
@@ -12,5 +12,5 @@
},
"nullable": []
},
- "hash": "07ebc9dc82cd012cd4f5880b1eb3d82602c195a3e3ddd557103ee037aa6dad1c"
+ "hash": "5e7146bc9dc9145cf3d01875ee599ada89e28c63fd10b3f23680d6660d0e57a2"
}
diff --git a/.sqlx/query-8b95bd5ed139be6545147217b2d83f6817ce05fd3212b900f0d437ca42decd47.json b/.sqlx/query-7b4b1ad13215473d1bfc5ba7f540b2360c15c193df1dd120722fda91a48ada24.json
similarity index 55%
rename from .sqlx/query-8b95bd5ed139be6545147217b2d83f6817ce05fd3212b900f0d437ca42decd47.json
rename to .sqlx/query-7b4b1ad13215473d1bfc5ba7f540b2360c15c193df1dd120722fda91a48ada24.json
index 2307d9fd..f068ba26 100644
--- a/.sqlx/query-8b95bd5ed139be6545147217b2d83f6817ce05fd3212b900f0d437ca42decd47.json
+++ b/.sqlx/query-7b4b1ad13215473d1bfc5ba7f540b2360c15c193df1dd120722fda91a48ada24.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n SELECT m.id id, m.title title, m.description description, m.downloads downloads, m.follows follows,\n m.icon_url icon_url, m.body body, m.published published,\n m.updated updated, m.approved approved, m.queued, m.status status, m.requested_status requested_status,\n m.issues_url issues_url, m.source_url source_url, m.wiki_url wiki_url, m.discord_url discord_url, m.license_url license_url,\n m.team_id team_id, m.organization_id organization_id, m.license license, m.slug slug, m.moderation_message moderation_message, m.moderation_message_body moderation_message_body,\n m.webhook_sent, m.color,\n t.id thread_id, m.monetization_status monetization_status,\n ARRAY_AGG(DISTINCT l.loader) filter (where l.loader is not null) loaders,\n ARRAY_AGG(DISTINCT pt.name) filter (where pt.name is not null) project_types,\n ARRAY_AGG(DISTINCT g.slug) filter (where g.slug is not null) games,\n ARRAY_AGG(DISTINCT c.category) filter (where c.category is not null and mc.is_additional is false) categories,\n ARRAY_AGG(DISTINCT c.category) filter (where c.category is not null and mc.is_additional is true) additional_categories,\n JSONB_AGG(DISTINCT jsonb_build_object('id', v.id, 'date_published', v.date_published)) filter (where v.id is not null) versions,\n JSONB_AGG(DISTINCT jsonb_build_object('image_url', mg.image_url, 'featured', mg.featured, 'title', mg.title, 'description', mg.description, 'created', mg.created, 'ordering', mg.ordering)) filter (where mg.image_url is not null) gallery,\n JSONB_AGG(DISTINCT jsonb_build_object('platform_id', md.joining_platform_id, 'platform_short', dp.short, 'platform_name', dp.name,'url', md.url)) filter (where md.joining_platform_id is not null) donations\n FROM mods m \n INNER JOIN threads t ON t.mod_id = m.id\n LEFT JOIN mods_gallery mg ON mg.mod_id = m.id\n LEFT JOIN mods_donations md ON md.joining_mod_id = m.id\n LEFT JOIN donation_platforms dp ON md.joining_platform_id = dp.id\n LEFT JOIN mods_categories mc ON mc.joining_mod_id = m.id\n LEFT JOIN categories c ON mc.joining_category_id = c.id\n LEFT JOIN versions v ON v.mod_id = m.id AND v.status = ANY($3)\n LEFT JOIN loaders_versions lv ON lv.version_id = v.id\n LEFT JOIN loaders l on lv.loader_id = l.id\n LEFT JOIN loaders_project_types lpt ON lpt.joining_loader_id = l.id\n LEFT JOIN project_types pt ON pt.id = lpt.joining_project_type_id\n LEFT JOIN loaders_project_types_games lptg ON lptg.loader_id = l.id AND lptg.project_type_id = pt.id\n LEFT JOIN games g ON lptg.game_id = g.id\n WHERE m.id = ANY($1) OR m.slug = ANY($2)\n GROUP BY t.id, m.id;\n ",
+ "query": "\n SELECT m.id id, m.title title, m.description description, m.downloads downloads, m.follows follows,\n m.icon_url icon_url, m.body body, m.published published,\n m.updated updated, m.approved approved, m.queued, m.status status, m.requested_status requested_status,\n m.license_url license_url,\n m.team_id team_id, m.organization_id organization_id, m.license license, m.slug slug, m.moderation_message moderation_message, m.moderation_message_body moderation_message_body,\n m.webhook_sent, m.color,\n t.id thread_id, m.monetization_status monetization_status,\n ARRAY_AGG(DISTINCT l.loader) filter (where l.loader is not null) loaders,\n ARRAY_AGG(DISTINCT pt.name) filter (where pt.name is not null) project_types,\n ARRAY_AGG(DISTINCT g.slug) filter (where g.slug is not null) games,\n ARRAY_AGG(DISTINCT c.category) filter (where c.category is not null and mc.is_additional is false) categories,\n ARRAY_AGG(DISTINCT c.category) filter (where c.category is not null and mc.is_additional is true) additional_categories,\n JSONB_AGG(DISTINCT jsonb_build_object('id', v.id, 'date_published', v.date_published)) filter (where v.id is not null) versions,\n JSONB_AGG(DISTINCT jsonb_build_object('image_url', mg.image_url, 'featured', mg.featured, 'title', mg.title, 'description', mg.description, 'created', mg.created, 'ordering', mg.ordering)) filter (where mg.image_url is not null) gallery,\n JSONB_AGG(DISTINCT jsonb_build_object('platform_id', ml.joining_platform_id, 'platform_name', lp.name,'url', ml.url, 'donation', lp.donation)) filter (where ml.joining_platform_id is not null) links\n FROM mods m \n INNER JOIN threads t ON t.mod_id = m.id\n LEFT JOIN mods_gallery mg ON mg.mod_id = m.id\n LEFT JOIN mods_links ml ON ml.joining_mod_id = m.id\n LEFT JOIN link_platforms lp ON ml.joining_platform_id = lp.id\n LEFT JOIN mods_categories mc ON mc.joining_mod_id = m.id\n LEFT JOIN categories c ON mc.joining_category_id = c.id\n LEFT JOIN versions v ON v.mod_id = m.id AND v.status = ANY($3)\n LEFT JOIN loaders_versions lv ON lv.version_id = v.id\n LEFT JOIN loaders l on lv.loader_id = l.id\n LEFT JOIN loaders_project_types lpt ON lpt.joining_loader_id = l.id\n LEFT JOIN project_types pt ON pt.id = lpt.joining_project_type_id\n LEFT JOIN loaders_project_types_games lptg ON lptg.loader_id = l.id AND lptg.project_type_id = pt.id\n LEFT JOIN games g ON lptg.game_id = g.id\n WHERE m.id = ANY($1) OR m.slug = ANY($2)\n GROUP BY t.id, m.id;\n ",
"describe": {
"columns": [
{
@@ -70,117 +70,97 @@
},
{
"ordinal": 13,
- "name": "issues_url",
- "type_info": "Varchar"
- },
- {
- "ordinal": 14,
- "name": "source_url",
- "type_info": "Varchar"
- },
- {
- "ordinal": 15,
- "name": "wiki_url",
- "type_info": "Varchar"
- },
- {
- "ordinal": 16,
- "name": "discord_url",
- "type_info": "Varchar"
- },
- {
- "ordinal": 17,
"name": "license_url",
"type_info": "Varchar"
},
{
- "ordinal": 18,
+ "ordinal": 14,
"name": "team_id",
"type_info": "Int8"
},
{
- "ordinal": 19,
+ "ordinal": 15,
"name": "organization_id",
"type_info": "Int8"
},
{
- "ordinal": 20,
+ "ordinal": 16,
"name": "license",
"type_info": "Varchar"
},
{
- "ordinal": 21,
+ "ordinal": 17,
"name": "slug",
"type_info": "Varchar"
},
{
- "ordinal": 22,
+ "ordinal": 18,
"name": "moderation_message",
"type_info": "Varchar"
},
{
- "ordinal": 23,
+ "ordinal": 19,
"name": "moderation_message_body",
"type_info": "Varchar"
},
{
- "ordinal": 24,
+ "ordinal": 20,
"name": "webhook_sent",
"type_info": "Bool"
},
{
- "ordinal": 25,
+ "ordinal": 21,
"name": "color",
"type_info": "Int4"
},
{
- "ordinal": 26,
+ "ordinal": 22,
"name": "thread_id",
"type_info": "Int8"
},
{
- "ordinal": 27,
+ "ordinal": 23,
"name": "monetization_status",
"type_info": "Varchar"
},
{
- "ordinal": 28,
+ "ordinal": 24,
"name": "loaders",
"type_info": "VarcharArray"
},
{
- "ordinal": 29,
+ "ordinal": 25,
"name": "project_types",
"type_info": "VarcharArray"
},
{
- "ordinal": 30,
+ "ordinal": 26,
"name": "games",
"type_info": "VarcharArray"
},
{
- "ordinal": 31,
+ "ordinal": 27,
"name": "categories",
"type_info": "VarcharArray"
},
{
- "ordinal": 32,
+ "ordinal": 28,
"name": "additional_categories",
"type_info": "VarcharArray"
},
{
- "ordinal": 33,
+ "ordinal": 29,
"name": "versions",
"type_info": "Jsonb"
},
{
- "ordinal": 34,
+ "ordinal": 30,
"name": "gallery",
"type_info": "Jsonb"
},
{
- "ordinal": 35,
- "name": "donations",
+ "ordinal": 31,
+ "name": "links",
"type_info": "Jsonb"
}
],
@@ -206,10 +186,6 @@
false,
true,
true,
- true,
- true,
- true,
- true,
false,
true,
false,
@@ -230,5 +206,5 @@
null
]
},
- "hash": "8b95bd5ed139be6545147217b2d83f6817ce05fd3212b900f0d437ca42decd47"
+ "hash": "7b4b1ad13215473d1bfc5ba7f540b2360c15c193df1dd120722fda91a48ada24"
}
diff --git a/.sqlx/query-83d428e1c07d16e356ef26bdf1d707940b1683b5f631ded1f6674a081453d67b.json b/.sqlx/query-83d428e1c07d16e356ef26bdf1d707940b1683b5f631ded1f6674a081453d67b.json
deleted file mode 100644
index 41542fd8..00000000
--- a/.sqlx/query-83d428e1c07d16e356ef26bdf1d707940b1683b5f631ded1f6674a081453d67b.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n UPDATE mods\n SET source_url = $1\n WHERE (id = $2)\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Varchar",
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "83d428e1c07d16e356ef26bdf1d707940b1683b5f631ded1f6674a081453d67b"
-}
diff --git a/.sqlx/query-fefb4f07a0f0c0cf74e554d120f8707d698fc8b4dbb66d2830f4ec0229bc1019.json b/.sqlx/query-83dc16cc7a0f4507e308a06f4924065e4ea25de0210be222ceae8eb645f888e3.json
similarity index 58%
rename from .sqlx/query-fefb4f07a0f0c0cf74e554d120f8707d698fc8b4dbb66d2830f4ec0229bc1019.json
rename to .sqlx/query-83dc16cc7a0f4507e308a06f4924065e4ea25de0210be222ceae8eb645f888e3.json
index e2b9c106..015a47d4 100644
--- a/.sqlx/query-fefb4f07a0f0c0cf74e554d120f8707d698fc8b4dbb66d2830f4ec0229bc1019.json
+++ b/.sqlx/query-83dc16cc7a0f4507e308a06f4924065e4ea25de0210be222ceae8eb645f888e3.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n INSERT INTO mods (\n id, team_id, title, description, body,\n published, downloads, icon_url, issues_url,\n source_url, wiki_url, status, requested_status, discord_url,\n license_url, license,\n slug, color, monetization_status\n )\n VALUES (\n $1, $2, $3, $4, $5,\n $6, $7, $8, $9,\n $10, $11, $12, $13, $14,\n $15, $16, \n LOWER($17), $18, $19\n )\n ",
+ "query": "\n INSERT INTO mods (\n id, team_id, title, description, body,\n published, downloads, icon_url, status, requested_status,\n license_url, license,\n slug, color, monetization_status\n )\n VALUES (\n $1, $2, $3, $4, $5, $6, \n $7, $8, $9, $10, \n $11, $12, \n LOWER($13), $14, $15\n )\n ",
"describe": {
"columns": [],
"parameters": {
@@ -17,10 +17,6 @@
"Varchar",
"Varchar",
"Varchar",
- "Varchar",
- "Varchar",
- "Varchar",
- "Varchar",
"Text",
"Int4",
"Varchar"
@@ -28,5 +24,5 @@
},
"nullable": []
},
- "hash": "fefb4f07a0f0c0cf74e554d120f8707d698fc8b4dbb66d2830f4ec0229bc1019"
+ "hash": "83dc16cc7a0f4507e308a06f4924065e4ea25de0210be222ceae8eb645f888e3"
}
diff --git a/.sqlx/query-872374755deb5d68092dff9fcbc355da7c5c9cea4b471e79b17c4a9cfd6f9954.json b/.sqlx/query-872374755deb5d68092dff9fcbc355da7c5c9cea4b471e79b17c4a9cfd6f9954.json
new file mode 100644
index 00000000..1dac397e
--- /dev/null
+++ b/.sqlx/query-872374755deb5d68092dff9fcbc355da7c5c9cea4b471e79b17c4a9cfd6f9954.json
@@ -0,0 +1,14 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n DELETE FROM mods_links\n WHERE joining_mod_id = $1\n ",
+ "describe": {
+ "columns": [],
+ "parameters": {
+ "Left": [
+ "Int8"
+ ]
+ },
+ "nullable": []
+ },
+ "hash": "872374755deb5d68092dff9fcbc355da7c5c9cea4b471e79b17c4a9cfd6f9954"
+}
diff --git a/.sqlx/query-88a085c2f2b1aa11eacdeedb68b490a695ebf2a9efb24bd5715b8d903f57e2c5.json b/.sqlx/query-88a085c2f2b1aa11eacdeedb68b490a695ebf2a9efb24bd5715b8d903f57e2c5.json
new file mode 100644
index 00000000..fd7b63b9
--- /dev/null
+++ b/.sqlx/query-88a085c2f2b1aa11eacdeedb68b490a695ebf2a9efb24bd5715b8d903f57e2c5.json
@@ -0,0 +1,15 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n DELETE FROM mods_links\n WHERE joining_mod_id = $1 AND joining_platform_id IN (\n SELECT id FROM link_platforms WHERE name = ANY($2)\n )\n ",
+ "describe": {
+ "columns": [],
+ "parameters": {
+ "Left": [
+ "Int8",
+ "TextArray"
+ ]
+ },
+ "nullable": []
+ },
+ "hash": "88a085c2f2b1aa11eacdeedb68b490a695ebf2a9efb24bd5715b8d903f57e2c5"
+}
diff --git a/.sqlx/query-8abb317c85f48c7dd9ccf4a7b8fbc0b58ac73f7ae87ff2dfe67009a51089f784.json b/.sqlx/query-8abb317c85f48c7dd9ccf4a7b8fbc0b58ac73f7ae87ff2dfe67009a51089f784.json
deleted file mode 100644
index fc2c3450..00000000
--- a/.sqlx/query-8abb317c85f48c7dd9ccf4a7b8fbc0b58ac73f7ae87ff2dfe67009a51089f784.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n UPDATE mods\n SET wiki_url = $1\n WHERE (id = $2)\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Varchar",
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "8abb317c85f48c7dd9ccf4a7b8fbc0b58ac73f7ae87ff2dfe67009a51089f784"
-}
diff --git a/.sqlx/query-99a1eac69d7f5a5139703df431e6a5c3012a90143a8c635f93632f04d0bc41d4.json b/.sqlx/query-99a1eac69d7f5a5139703df431e6a5c3012a90143a8c635f93632f04d0bc41d4.json
deleted file mode 100644
index aba372c1..00000000
--- a/.sqlx/query-99a1eac69d7f5a5139703df431e6a5c3012a90143a8c635f93632f04d0bc41d4.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n UPDATE mods\n SET wiki_url = $1\n WHERE (id = $2)\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Varchar",
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "99a1eac69d7f5a5139703df431e6a5c3012a90143a8c635f93632f04d0bc41d4"
-}
diff --git a/.sqlx/query-9aab2350d576fd934b0541d1f71f320ac939b44a179fee3d1638113cdb3ddfe7.json b/.sqlx/query-9aab2350d576fd934b0541d1f71f320ac939b44a179fee3d1638113cdb3ddfe7.json
deleted file mode 100644
index 7683ee0c..00000000
--- a/.sqlx/query-9aab2350d576fd934b0541d1f71f320ac939b44a179fee3d1638113cdb3ddfe7.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n INSERT INTO mods_donations (joining_mod_id, joining_platform_id, url)\n VALUES ($1, $2, $3)\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Int8",
- "Int4",
- "Varchar"
- ]
- },
- "nullable": []
- },
- "hash": "9aab2350d576fd934b0541d1f71f320ac939b44a179fee3d1638113cdb3ddfe7"
-}
diff --git a/.sqlx/query-acbafe265c4b7a1c95b0494a0a03c8bd2cd778ae561ef5a662fa931ca26cf603.json b/.sqlx/query-acbafe265c4b7a1c95b0494a0a03c8bd2cd778ae561ef5a662fa931ca26cf603.json
deleted file mode 100644
index 9cbd917c..00000000
--- a/.sqlx/query-acbafe265c4b7a1c95b0494a0a03c8bd2cd778ae561ef5a662fa931ca26cf603.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n DELETE FROM mods_donations\n WHERE joining_mod_id = $1\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "acbafe265c4b7a1c95b0494a0a03c8bd2cd778ae561ef5a662fa931ca26cf603"
-}
diff --git a/.sqlx/query-d8020ed838c032c2c287dc0f08989b3ab7156f2571bc75505e6f57b0caeef9c7.json b/.sqlx/query-b1bfb62f4a28ca0fae778738e8a8f325185a83c5d5a240c088a2397b35c55f2a.json
similarity index 59%
rename from .sqlx/query-d8020ed838c032c2c287dc0f08989b3ab7156f2571bc75505e6f57b0caeef9c7.json
rename to .sqlx/query-b1bfb62f4a28ca0fae778738e8a8f325185a83c5d5a240c088a2397b35c55f2a.json
index c8e8481e..5610c103 100644
--- a/.sqlx/query-d8020ed838c032c2c287dc0f08989b3ab7156f2571bc75505e6f57b0caeef9c7.json
+++ b/.sqlx/query-b1bfb62f4a28ca0fae778738e8a8f325185a83c5d5a240c088a2397b35c55f2a.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n SELECT id FROM donation_platforms\n WHERE short = $1\n ",
+ "query": "\n SELECT id FROM link_platforms\n WHERE name = $1\n ",
"describe": {
"columns": [
{
@@ -18,5 +18,5 @@
false
]
},
- "hash": "d8020ed838c032c2c287dc0f08989b3ab7156f2571bc75505e6f57b0caeef9c7"
+ "hash": "b1bfb62f4a28ca0fae778738e8a8f325185a83c5d5a240c088a2397b35c55f2a"
}
diff --git a/.sqlx/query-bad7cae347771e801976c26f2afaf33bda371051923b8f74a2f32a0ef5c65e57.json b/.sqlx/query-bad7cae347771e801976c26f2afaf33bda371051923b8f74a2f32a0ef5c65e57.json
deleted file mode 100644
index 1ab92b4c..00000000
--- a/.sqlx/query-bad7cae347771e801976c26f2afaf33bda371051923b8f74a2f32a0ef5c65e57.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n UPDATE mods\n SET discord_url = $1\n WHERE (id = $2)\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Varchar",
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "bad7cae347771e801976c26f2afaf33bda371051923b8f74a2f32a0ef5c65e57"
-}
diff --git a/.sqlx/query-bc91841f9672608a28bd45a862919f2bd34fac0b3479e3b4b67a9f6bea2a562a.json b/.sqlx/query-bc91841f9672608a28bd45a862919f2bd34fac0b3479e3b4b67a9f6bea2a562a.json
deleted file mode 100644
index fb1b14f1..00000000
--- a/.sqlx/query-bc91841f9672608a28bd45a862919f2bd34fac0b3479e3b4b67a9f6bea2a562a.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n UPDATE mods\n SET issues_url = $1\n WHERE (id = $2)\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Varchar",
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "bc91841f9672608a28bd45a862919f2bd34fac0b3479e3b4b67a9f6bea2a562a"
-}
diff --git a/.sqlx/query-e3fb74a94a6a78b1007dd99ad11bdcfaa0957ed7d1683997aef7301e0f15baba.json b/.sqlx/query-e3fb74a94a6a78b1007dd99ad11bdcfaa0957ed7d1683997aef7301e0f15baba.json
deleted file mode 100644
index ab0f3449..00000000
--- a/.sqlx/query-e3fb74a94a6a78b1007dd99ad11bdcfaa0957ed7d1683997aef7301e0f15baba.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n UPDATE mods\n SET issues_url = $1\n WHERE (id = $2)\n ",
- "describe": {
- "columns": [],
- "parameters": {
- "Left": [
- "Varchar",
- "Int8"
- ]
- },
- "nullable": []
- },
- "hash": "e3fb74a94a6a78b1007dd99ad11bdcfaa0957ed7d1683997aef7301e0f15baba"
-}
diff --git a/.sqlx/query-76db1c204139e18002e5751c3dcefff79791a1dd852b62d34fcf008151e8945a.json b/.sqlx/query-fef7802edefa1a6957fa43ccf64b987c3547294f0c8581028ac6b83de42b3a00.json
similarity index 64%
rename from .sqlx/query-76db1c204139e18002e5751c3dcefff79791a1dd852b62d34fcf008151e8945a.json
rename to .sqlx/query-fef7802edefa1a6957fa43ccf64b987c3547294f0c8581028ac6b83de42b3a00.json
index a16f796c..bcca3ff2 100644
--- a/.sqlx/query-76db1c204139e18002e5751c3dcefff79791a1dd852b62d34fcf008151e8945a.json
+++ b/.sqlx/query-fef7802edefa1a6957fa43ccf64b987c3547294f0c8581028ac6b83de42b3a00.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n SELECT id, short, name FROM donation_platforms\n ",
+ "query": "\n SELECT id, name, donation FROM link_platforms\n ",
"describe": {
"columns": [
{
@@ -10,13 +10,13 @@
},
{
"ordinal": 1,
- "name": "short",
+ "name": "name",
"type_info": "Varchar"
},
{
"ordinal": 2,
- "name": "name",
- "type_info": "Varchar"
+ "name": "donation",
+ "type_info": "Bool"
}
],
"parameters": {
@@ -28,5 +28,5 @@
false
]
},
- "hash": "76db1c204139e18002e5751c3dcefff79791a1dd852b62d34fcf008151e8945a"
+ "hash": "fef7802edefa1a6957fa43ccf64b987c3547294f0c8581028ac6b83de42b3a00"
}
diff --git a/src/database/models/categories.rs b/src/database/models/categories.rs
index d34e0206..4e04dba5 100644
--- a/src/database/models/categories.rs
+++ b/src/database/models/categories.rs
@@ -130,10 +130,7 @@ impl Category {
}
impl LinkPlatform {
- pub async fn get_id<'a, E>(
- id: &str,
- exec: E,
- ) -> Result