Compare commits
No commits in common. "83fee98059ced5aaee9a1109ccb5129cf47fc360" and "6d538ed15419d898482f94da4de7da1067974817" have entirely different histories.
83fee98059
...
6d538ed154
2 changed files with 26 additions and 32 deletions
|
|
@ -196,7 +196,7 @@ paths:
|
||||||
# error:
|
# error:
|
||||||
# type: string
|
# type: string
|
||||||
|
|
||||||
/users:
|
# /users:
|
||||||
# get:
|
# get:
|
||||||
# summary: Search user
|
# summary: Search user
|
||||||
# parameters:
|
# parameters:
|
||||||
|
|
@ -218,28 +218,28 @@ paths:
|
||||||
# items:
|
# items:
|
||||||
# $ref: '#/components/schemas/User'
|
# $ref: '#/components/schemas/User'
|
||||||
|
|
||||||
post:
|
# post:
|
||||||
summary: Add new user
|
# summary: Add new user
|
||||||
requestBody:
|
# requestBody:
|
||||||
required: true
|
# required: true
|
||||||
content:
|
# content:
|
||||||
application/json:
|
# application/json:
|
||||||
schema:
|
# schema:
|
||||||
$ref: '#/components/schemas/User'
|
# $ref: '#/components/schemas/User'
|
||||||
responses:
|
# responses:
|
||||||
'200':
|
# '200':
|
||||||
description: Add result
|
# description: Add result
|
||||||
content:
|
# content:
|
||||||
application/json:
|
# application/json:
|
||||||
schema:
|
# schema:
|
||||||
type: object
|
# type: object
|
||||||
properties:
|
# properties:
|
||||||
success:
|
# success:
|
||||||
type: boolean
|
# type: boolean
|
||||||
error:
|
# error:
|
||||||
type: string
|
# type: string
|
||||||
user_json:
|
# user_json:
|
||||||
$ref: '#/components/schemas/User'
|
# $ref: '#/components/schemas/User'
|
||||||
|
|
||||||
# /users/{user_id}/titles:
|
# /users/{user_id}/titles:
|
||||||
# get:
|
# get:
|
||||||
|
|
@ -580,7 +580,7 @@ components:
|
||||||
required:
|
required:
|
||||||
- user_id
|
- user_id
|
||||||
- nickname
|
- nickname
|
||||||
# - creation_date
|
- creation_date
|
||||||
UserTitle:
|
UserTitle:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ CREATE TABLE users (
|
||||||
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||||
avatar_id bigint REFERENCES images (id),
|
avatar_id bigint REFERENCES images (id),
|
||||||
passhash text NOT NULL,
|
passhash text NOT NULL,
|
||||||
mail text CHECK (mail ~ '^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+$'),
|
mail text CHECK (mail ~ '[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+'),
|
||||||
nickname text UNIQUE NOT NULL CHECK (nickname ~ '^[a-zA-Z0-9_-]{3,}$'),
|
nickname text NOT NULL CHECK (nickname ~ '^[a-zA-Z0-9_-]+$'),
|
||||||
disp_name text,
|
disp_name text,
|
||||||
user_desc text,
|
user_desc text,
|
||||||
creation_date timestamptz NOT NULL,
|
creation_date timestamptz NOT NULL,
|
||||||
|
|
@ -85,12 +85,6 @@ CREATE TABLE signals (
|
||||||
pending boolean NOT NULL
|
pending boolean NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE external_ids (
|
|
||||||
user_id NOT NULL REFERENCES users (id),
|
|
||||||
service_id text NOT NULL,
|
|
||||||
external_ids text NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
-- Functions
|
-- Functions
|
||||||
CREATE OR REPLACE FUNCTION update_title_rating()
|
CREATE OR REPLACE FUNCTION update_title_rating()
|
||||||
RETURNS TRIGGER AS $$
|
RETURNS TRIGGER AS $$
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue