init codebase
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE IF NOT EXISTS invites (
|
||||
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
community_id uuid NOT NULL REFERENCES communities (id) ON DELETE CASCADE,
|
||||
created_by uuid REFERENCES users (id),
|
||||
code text UNIQUE NOT NULL,
|
||||
max_uses int,
|
||||
uses int DEFAULT 0,
|
||||
expires_at timestamptz,
|
||||
created_at timestamptz DEFAULT now()
|
||||
);
|
||||
Reference in New Issue
Block a user