mirror of
https://github.com/kevin-DL/football_info_api.git
synced 2026-01-16 04:04:36 +00:00
Initial commit
This commit is contained in:
4
sql/queries/users.sql
Normal file
4
sql/queries/users.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- name: CreateUser :one
|
||||
INSERT INTO users (id, name, created_at, updated_at)
|
||||
VALUES ($1, $2, $3, $4)
|
||||
RETURNING *;
|
||||
24
sql/schema/20230528140356_create_profiles_table.sql
Normal file
24
sql/schema/20230528140356_create_profiles_table.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
SELECT 'up SQL query';
|
||||
create table profiles
|
||||
(
|
||||
id uuid not null
|
||||
constraint profiles_pk
|
||||
primary key,
|
||||
display_name varchar not null,
|
||||
user_id uuid not null ,
|
||||
created_at timestamptz not null,
|
||||
updated_at timestamptz not null
|
||||
);
|
||||
|
||||
create unique index profiles_user_id_index
|
||||
on profiles (user_id);
|
||||
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
SELECT 'down SQL query';
|
||||
drop table profiles;
|
||||
-- +goose StatementEnd
|
||||
Reference in New Issue
Block a user