11 lines
464 B
SQL
11 lines
464 B
SQL
CREATE TABLE IF NOT EXISTS webhooks (
|
|
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
community_id uuid NOT NULL REFERENCES communities (id) ON DELETE CASCADE,
|
|
channel_id uuid NOT NULL REFERENCES channels (id) ON DELETE CASCADE,
|
|
name text NOT NULL,
|
|
avatar_url text,
|
|
token_hash text NOT NULL,
|
|
created_by uuid REFERENCES users (id),
|
|
created_at timestamptz DEFAULT now()
|
|
);
|