diff --git a/database/mainpage.go b/database/mainpage.go index 3229318..614f4f6 100644 --- a/database/mainpage.go +++ b/database/mainpage.go @@ -33,6 +33,10 @@ func DbMainpage(pool *pgxpool.Pool) gin.H { log.Println(err.Error()) } + persons = append(persons, models.Person{ + Id: -1, + Name: "-- Auswählen --", + }) var person models.Person for wperson.Next() { err = wperson.Scan(&person.Id, &person.Name) diff --git a/database/migrations/20100830203_washlistpersonint.down.psql b/database/migrations/20100830203_washlistpersonint.down.psql new file mode 100644 index 0000000..5ae088a --- /dev/null +++ b/database/migrations/20100830203_washlistpersonint.down.psql @@ -0,0 +1,3 @@ +-- +-- DROP/Reverse everything here +-- \ No newline at end of file diff --git a/database/migrations/20100830203_washlistpersonint.up.psql b/database/migrations/20100830203_washlistpersonint.up.psql new file mode 100644 index 0000000..329abb0 --- /dev/null +++ b/database/migrations/20100830203_washlistpersonint.up.psql @@ -0,0 +1,3 @@ +ALTER TABLE public.washlist DROP COLUMN washed; +ALTER TABLE public.washlist + ADD COLUMN washed integer; diff --git a/database/migrations/20100830204_washlistpersondefault.down.psql b/database/migrations/20100830204_washlistpersondefault.down.psql new file mode 100644 index 0000000..5ae088a --- /dev/null +++ b/database/migrations/20100830204_washlistpersondefault.down.psql @@ -0,0 +1,3 @@ +-- +-- DROP/Reverse everything here +-- \ No newline at end of file diff --git a/database/migrations/20100830204_washlistpersondefault.up.psql b/database/migrations/20100830204_washlistpersondefault.up.psql new file mode 100644 index 0000000..b8cb9cd --- /dev/null +++ b/database/migrations/20100830204_washlistpersondefault.up.psql @@ -0,0 +1,2 @@ +ALTER TABLE public.washlist + ALTER COLUMN washed SET DEFAULT -1; \ No newline at end of file diff --git a/html/mainpage/index.html b/html/mainpage/index.html index 683b55e..8079d37 100644 --- a/html/mainpage/index.html +++ b/html/mainpage/index.html @@ -15,7 +15,6 @@