diff --git a/auth/sql/migrations/000001_users.up.sql b/auth/sql/migrations/000001_users.up.sql index 2f6689a5..25358905 100644 --- a/auth/sql/migrations/000001_users.up.sql +++ b/auth/sql/migrations/000001_users.up.sql @@ -7,8 +7,8 @@ create table users( password text, claims jsonb not null, - created_date timestampz not null default now()::timestampz, - last_seen timestampz not null default now()::timestampz + created_date timestamptz not null default now()::timestamptz, + last_seen timestamptz not null default now()::timestamptz ); create table oidc_handle( @@ -21,7 +21,7 @@ create table oidc_handle( access_token text, refresh_token text, - expire_at timestampz, + expire_at timestamptz, constraint oidc_handle_pk primary key (user_id, provider) ); diff --git a/auth/sql/migrations/000003_sessions.up.sql b/auth/sql/migrations/000003_sessions.up.sql index ff9db051..aae74520 100644 --- a/auth/sql/migrations/000003_sessions.up.sql +++ b/auth/sql/migrations/000003_sessions.up.sql @@ -3,8 +3,8 @@ begin; create table sessions( id varchar(128) not null primary key, user_id uuid not null references users(id) on delete cascade, - created_date timestampz not null default now()::timestampz, - last_used timestampz not null default now()::timestampz, + created_date timestamptz not null default now()::timestamptz, + last_used timestamptz not null default now()::timestamptz, device varchar(1024) ); diff --git a/auth/sql/queries/sessions.sql b/auth/sql/queries/sessions.sql index 38783702..2b6c1d48 100644 --- a/auth/sql/queries/sessions.sql +++ b/auth/sql/queries/sessions.sql @@ -12,7 +12,7 @@ limit 1; update sessions set - last_used = now()::timestampz + last_used = now()::timestamptz where id = $1; diff --git a/auth/sqlc.yaml b/auth/sqlc.yaml index 75049429..440f0e06 100644 --- a/auth/sqlc.yaml +++ b/auth/sqlc.yaml @@ -11,7 +11,7 @@ sql: emit_pointers_for_null_types: true emit_json_tags: true overrides: - - db_type: "timestampz" + - db_type: "timestamptz" go_type: import: "time" type: "Time"