This commit is contained in:
parent
1bb367e708
commit
c2233e0e6a
@ -5,7 +5,7 @@ CREATE TYPE task_manager.task_status AS ENUM('todo','in_progress','paused','test
|
||||
|
||||
CREATE TABLE task_manager.tasks(
|
||||
"id" SERIAL PRIMARY KEY UNIQUE,
|
||||
"id_sprint" INTEGER NOT NULL,
|
||||
"id_sprint" INTEGER,
|
||||
"id_user" INTEGER,
|
||||
"id_project" INTEGER NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func (tm *TaskManagerRepository) AddTask(task *tasks.Task) error {
|
||||
err := tm.db.QueryRow(`INSERT INTO task_manager.tasks(id_sprint,id_user,id_project,title,description,duration,status)
|
||||
err := tm.db.QueryRow(`INSERT INTO task_manager.tasks(id_sprint,id_user,id_project,title,description,duration)
|
||||
VALUES($1,$2,$3,$4,$5,$6,$7)
|
||||
RETURNING id`,
|
||||
task.IdSprint,
|
||||
@ -16,8 +16,7 @@ func (tm *TaskManagerRepository) AddTask(task *tasks.Task) error {
|
||||
task.IdProject,
|
||||
task.Title,
|
||||
task.Description,
|
||||
task.Duration,
|
||||
task.Status).Scan(&task.Id)
|
||||
task.Duration).Scan(&task.Id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user