From 4c45d009894b26156b86472bf83b5ce0edc7740f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borna=20Rajkovi=C4=87?= Date: Sat, 5 Aug 2023 22:10:15 +0200 Subject: [PATCH] Fixed production migration + v0.2.2 -> v0.2.3 --- db/prod/v1_0.sql | 18 +++++++++++++++++- makefile | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/db/prod/v1_0.sql b/db/prod/v1_0.sql index 23565b3..4d917ab 100644 --- a/db/prod/v1_0.sql +++ b/db/prod/v1_0.sql @@ -19,5 +19,21 @@ CREATE TABLE IF NOT EXISTS "holiday" primary key (id), constraint fk_country_id foreign key (country) - references country(iso_name) on delete cascade on update cascade + references co + + primary key (id) + ); + +CREATE TABLE IF NOT EXISTS "holiday" +( + id uuid, + country char(2) NOT NULL, + date date NOT NULL, + name varchar(64) NOT NULL, + description varchar(512), + is_state boolean NOT NULL, + is_religious boolean NOT NULL, + + primary key (id), + constraint fk_country_id foreign key (cuntry(iso_name) on delete cascade on update cascade ); \ No newline at end of file diff --git a/makefile b/makefile index 304028c..2926bb9 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ # scripts for building app # requires go 1.19+ and git installed -VERSION := 0.2.2 +VERSION := 0.2.3 serve: go run ./...