This commit is contained in:
@@ -15,6 +15,7 @@ CREATE TABLE IF NOT EXISTS users (
|
||||
updated_at TIMESTAMPTZ DEFAULT now()
|
||||
);
|
||||
|
||||
ALTER TABLE users DROP CONSTRAINT IF EXISTS check_auth_provider;
|
||||
ALTER TABLE users ADD CONSTRAINT check_auth_provider
|
||||
CHECK (auth_provider IN ('local', 'google', 'facebook', 'github'));
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
CREATE EXTENSION IF NOT EXISTS pg_trgm;
|
||||
|
||||
CREATE TABLE medias (
|
||||
CREATE TABLE IF NOT EXISTS medias (
|
||||
id UUID PRIMARY KEY DEFAULT uuidv7(),
|
||||
user_id UUID REFERENCES users(id) ON DELETE CASCADE,
|
||||
storage_key VARCHAR(255) UNIQUE NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user