mirror of
https://github.com/penpot/penpot.git
synced 2025-06-11 09:51:39 +02:00
🔥 Remove old emails tables.
This commit is contained in:
parent
3433aa0c5b
commit
170d815620
3 changed files with 3 additions and 32 deletions
|
@ -1,26 +0,0 @@
|
||||||
CREATE TYPE email_status AS ENUM ('pending', 'ok', 'failed');
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS email_queue (
|
|
||||||
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
||||||
|
|
||||||
created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
|
|
||||||
modified_at timestamptz NOT NULL DEFAULT clock_timestamp(),
|
|
||||||
deleted_at timestamptz DEFAULT NULL,
|
|
||||||
|
|
||||||
data bytea NOT NULL,
|
|
||||||
|
|
||||||
priority smallint NOT NULL DEFAULT 10
|
|
||||||
CHECK (priority BETWEEN 0 and 10),
|
|
||||||
|
|
||||||
status email_status NOT NULL DEFAULT 'pending',
|
|
||||||
retries integer NOT NULL DEFAULT -1
|
|
||||||
);
|
|
||||||
|
|
||||||
-- Triggers
|
|
||||||
|
|
||||||
CREATE TRIGGER email_queue_modified_at_tgr BEFORE UPDATE ON email_queue
|
|
||||||
FOR EACH ROW EXECUTE PROCEDURE update_modified_at();
|
|
||||||
|
|
||||||
-- Indexes
|
|
||||||
|
|
||||||
CREATE INDEX email_status_idx ON email_queue (status);
|
|
|
@ -26,18 +26,15 @@
|
||||||
{:desc "Initial projects tables"
|
{:desc "Initial projects tables"
|
||||||
:name "0003-projects"
|
:name "0003-projects"
|
||||||
:fn (mg/resource "migrations/0003.projects.sql")}
|
:fn (mg/resource "migrations/0003.projects.sql")}
|
||||||
{:desc "Initial emails related tables"
|
{:desc "Initial tasks related tables"
|
||||||
:name "0004-emails"
|
:name "0004-tasks"
|
||||||
:fn (mg/resource "migrations/0004.emails.sql")}
|
:fn (mg/resource "migrations/0004.tasks.sql")}
|
||||||
{:desc "Initial images tables"
|
{:desc "Initial images tables"
|
||||||
:name "0005-images"
|
:name "0005-images"
|
||||||
:fn (mg/resource "migrations/0005.images.sql")}
|
:fn (mg/resource "migrations/0005.images.sql")}
|
||||||
{:desc "Initial icons tables"
|
{:desc "Initial icons tables"
|
||||||
:name "0006-icons"
|
:name "0006-icons"
|
||||||
:fn (mg/resource "migrations/0006.icons.sql")}
|
:fn (mg/resource "migrations/0006.icons.sql")}
|
||||||
{:desc "Initial tasks tables"
|
|
||||||
:name "0007-tasks"
|
|
||||||
:fn (mg/resource "migrations/0007.tasks.sql")}
|
|
||||||
]})
|
]})
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue