🗃️ changed db variables

Co-authored-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
haraldnilsen 2024-01-10 19:09:04 +01:00
parent ed474d4433
commit b6123ceb02
4 changed files with 9 additions and 3 deletions

View file

@ -143,5 +143,5 @@ func main() {
// Run the server on port 8080
router.Run(":8080")
//db.SetupDb()
// db.SetupDb()
}

View file

@ -62,6 +62,12 @@ func SetupDb() {
empati INT,
hjelpsomhet INT
);`,
`CREATE TABLE IF NOT EXISTS Evaluering (
evalueringtekst TEXT
);`,
`CREATE TABLE IF NOT EXISTS FeilRapport (
feiltekst TEXT
);`,
}
// Execute SQL statements

View file

@ -28,7 +28,7 @@ func InsertBugReport(bugText string) (error) {
}
insertStatement := `
INSERT INTO FeilRapport (feilTekst)
INSERT INTO FeilRapport (feiltekst)
VALUES ($1)
`
stmt, err := db.Prepare(insertStatement)

View file

@ -28,7 +28,7 @@ func InsertEvaluation(evaluationText string) (error) {
}
insertStatement := `
INSERT INTO Evaluering (evalueringTekst)
INSERT INTO Evaluering (evalueringtekst)
VALUES ($1)
`
stmt, err := db.Prepare(insertStatement)