DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

d154435a00bee04223fd952393be657f9231a2f0 — Jonni Liljamo 1 year, 10 months ago 027503b
fix(api): timestamp -> timestamptz
M api/migrations/2023-02-17-075706_create_users/up.sql => api/migrations/2023-02-17-075706_create_users/up.sql +2 -2
@@ 2,8 2,8 @@

CREATE TABLE users (
    id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid(),
    created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
    updated_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
    created_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
    updated_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
    username VARCHAR NOT NULL,
    email VARCHAR NOT NULL,
    password VARCHAR NOT NULL

M api/migrations/2023-02-17-085226_create_gamedata/up.sql => api/migrations/2023-02-17-085226_create_gamedata/up.sql +2 -2
@@ 2,8 2,8 @@

CREATE TABLE gamedata (
    id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid(),
    created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
    updated_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
    created_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
    updated_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
    turn SMALLINT NOT NULL,
    host_hand json,
    host_deck json,

M api/migrations/2023-02-17-085421_create_actions/up.sql => api/migrations/2023-02-17-085421_create_actions/up.sql +3 -3
@@ 2,12 2,12 @@

CREATE TABLE actions (
    id uuid PRIMARY KEY NOT NULL DEFAULT gen_random_uuid(),
    created_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
    updated_at TIMESTAMP NOT NULL DEFAULT current_timestamp,
    created_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
    updated_at TIMESTAMPTZ NOT NULL DEFAULT current_timestamp,
    game_data_id uuid REFERENCES gamedata(id) NOT NULL,
    invoker uuid REFERENCES users(id) NOT NULL,
    data json NOT NULL,
    timestamp TIMESTAMP NOT NULL DEFAULT current_timestamp
    timestamp TIMESTAMPTZ NOT NULL DEFAULT current_timestamp
);

SELECT diesel_manage_updated_at('actions');