From ddca119e45e248634771835a96f80d55f63b5fd8 Mon Sep 17 00:00:00 2001 From: nochill Date: Mon, 2 Oct 2023 08:49:19 +0700 Subject: [PATCH] update location data type not null --- db/migrations/000001_init_schema.up.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db/migrations/000001_init_schema.up.sql b/db/migrations/000001_init_schema.up.sql index 6eb6d10..2ae8fbe 100644 --- a/db/migrations/000001_init_schema.up.sql +++ b/db/migrations/000001_init_schema.up.sql @@ -53,14 +53,14 @@ CREATE TABLE user_reports( CREATE TABLE regions( "id" serial primary key not null, - "region_name" varchar, + "region_name" varchar not null, "created_at" timestamp default(now()), "updated_at" timestamp default(now()) ); CREATE TABLE provinces( "id" serial primary key not null, - "province_name" varchar, + "province_name" varchar not null, "region_id" smallint references "regions"("id") not null, "created_at" timestamp default(now()), "updated_at" timestamp default(now()) @@ -68,12 +68,12 @@ CREATE TABLE provinces( CREATE TABLE regencies( "id" serial primary key not null, - "regency_name" varchar, + "regency_name" varchar not null, "province_id" smallint references "provinces"("id") not null, "created_at" timestamp default(now()), "updated_at" timestamp default(now()) ); - + CREATE TYPE location_type AS ENUM( 'beach', 'amusement park',