Creation fix (#74)

* Lots of little fixes

* Change + Add TODOs back that were incomplete

* Fix migrations

* Run prepare

* Minor fixes

* Fix formatting

* SQLX Prepare

* Add status to creation query
This commit is contained in:
Geometrically
2020-10-14 20:43:40 -07:00
committed by GitHub
parent ad29f2477e
commit 285a97aaf8
2 changed files with 26 additions and 24 deletions

View File

@@ -945,6 +945,29 @@
]
}
},
"a2a99a640468a9fb8f0718e5aea6740cf5b33dafd5e038c154d6a13674fa999b": {
"query": "\n INSERT INTO mods (\n id, team_id, title, description, body_url,\n published, downloads, icon_url, issues_url,\n source_url, wiki_url, status\n )\n VALUES (\n $1, $2, $3, $4, $5,\n $6, $7, $8, $9,\n $10, $11, $12\n )\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Int8",
"Int8",
"Varchar",
"Varchar",
"Varchar",
"Timestamptz",
"Int4",
"Varchar",
"Varchar",
"Varchar",
"Varchar",
"Int4"
]
},
"nullable": []
}
},
"a39ce28b656032f862b205cffa393a76b989f4803654a615477a94fda5f57354": {
"query": "\n DELETE FROM states\n WHERE id = $1\n ",
"describe": {
@@ -1132,28 +1155,6 @@
"nullable": []
}
},
"bdc13b0000987fe08351751fed4f388856eb5c022bb27c2919dd72d4409c2412": {
"query": "\n INSERT INTO mods (\n id, team_id, title, description, body_url,\n published, downloads, icon_url, issues_url,\n source_url, wiki_url\n )\n VALUES (\n $1, $2, $3, $4, $5,\n $6, $7, $8, $9,\n $10, $11\n )\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"Int8",
"Int8",
"Varchar",
"Varchar",
"Varchar",
"Timestamptz",
"Int4",
"Varchar",
"Varchar",
"Varchar",
"Varchar"
]
},
"nullable": []
}
},
"bec1612d4929d143bc5d6860a57cc036c5ab23e69d750ca5791c620297953c50": {
"query": "\n SELECT team_id FROM mods WHERE id = $1\n ",
"describe": {

View File

@@ -85,12 +85,12 @@ impl Mod {
INSERT INTO mods (
id, team_id, title, description, body_url,
published, downloads, icon_url, issues_url,
source_url, wiki_url
source_url, wiki_url, status
)
VALUES (
$1, $2, $3, $4, $5,
$6, $7, $8, $9,
$10, $11
$10, $11, $12
)
",
self.id as ModId,
@@ -104,6 +104,7 @@ impl Mod {
self.issues_url.as_ref(),
self.source_url.as_ref(),
self.wiki_url.as_ref(),
self.status.0
)
.execute(&mut *transaction)
.await?;