From edaa327405c89fc9c0a8b56223e30f201809fea7 Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 1 Aug 2023 10:53:35 +0300 Subject: [PATCH] Update migrations to take timestamptz --- ...0727101912_init.down.sql => 20230801073734_init.down.sql} | 3 ++- ...20230727101912_init.up.sql => 20230801073734_init.up.sql} | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) rename migrations/{20230727101912_init.down.sql => 20230801073734_init.down.sql} (51%) rename migrations/{20230727101912_init.up.sql => 20230801073734_init.up.sql} (78%) diff --git a/migrations/20230727101912_init.down.sql b/migrations/20230801073734_init.down.sql similarity index 51% rename from migrations/20230727101912_init.down.sql rename to migrations/20230801073734_init.down.sql index b021ee6..1a26726 100644 --- a/migrations/20230727101912_init.down.sql +++ b/migrations/20230801073734_init.down.sql @@ -1,2 +1,3 @@ -- Add down migration script here -DROP TABLE IF EXISTS briefly; \ No newline at end of file + +DROP TABLE IF EXISTS briefly; diff --git a/migrations/20230727101912_init.up.sql b/migrations/20230801073734_init.up.sql similarity index 78% rename from migrations/20230727101912_init.up.sql rename to migrations/20230801073734_init.up.sql index 9d3009a..f100d25 100644 --- a/migrations/20230727101912_init.up.sql +++ b/migrations/20230801073734_init.up.sql @@ -1,9 +1,10 @@ -- Add up migration script here + CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE briefly( id UUID PRIMARY KEY NOT NULL DEFAULT (uuid_generate_v4()), url TEXT NOT NULL, extension TEXT NOT NULL UNIQUE, - created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() - ); \ No newline at end of file + created_at TIMESTAMPTZ + );