mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 21:26:13 +02:00
🎉 Add webhooks rpc API
This commit is contained in:
parent
d8bb62c498
commit
39b9daa3a7
8 changed files with 324 additions and 16 deletions
25
backend/src/app/migrations/sql/0085-add-webhook-table.sql
Normal file
25
backend/src/app/migrations/sql/0085-add-webhook-table.sql
Normal file
|
@ -0,0 +1,25 @@
|
|||
CREATE TABLE webhook (
|
||||
id uuid PRIMARY KEY,
|
||||
team_id uuid NOT NULL REFERENCES team(id) ON DELETE CASCADE DEFERRABLE,
|
||||
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_at timestamptz NOT NULL DEFAULT now(),
|
||||
|
||||
uri text NOT NULL,
|
||||
mtype text NOT NULL,
|
||||
|
||||
error_code text NULL,
|
||||
error_count smallint DEFAULT 0,
|
||||
|
||||
is_active boolean DEFAULT true,
|
||||
secret_key text NULL
|
||||
);
|
||||
|
||||
ALTER TABLE webhook
|
||||
ALTER COLUMN uri SET STORAGE external,
|
||||
ALTER COLUMN mtype SET STORAGE external,
|
||||
ALTER COLUMN error_code SET STORAGE external,
|
||||
ALTER COLUMN secret_key SET STORAGE external;
|
||||
|
||||
|
||||
CREATE INDEX webhook__team_id__idx ON webhook (team_id);
|
Loading…
Add table
Add a link
Reference in a new issue