Prepare production and Coolify deployment with original exports and datetime pickers
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
CREATE TABLE photo_exports (
|
||||
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
event_id uuid NOT NULL REFERENCES events(id) ON DELETE CASCADE,
|
||||
requested_by text NOT NULL REFERENCES "user"(id) ON DELETE CASCADE,
|
||||
filter text NOT NULL CHECK (filter IN ('approved', 'all')),
|
||||
status text NOT NULL DEFAULT 'pending',
|
||||
total integer NOT NULL DEFAULT 0,
|
||||
processed integer NOT NULL DEFAULT 0,
|
||||
expires_at timestamptz NOT NULL,
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
CREATE INDEX photo_exports_queue_idx ON photo_exports(status, created_at);
|
||||
CREATE UNIQUE INDEX photo_exports_active_idx ON photo_exports(event_id, requested_by)
|
||||
WHERE status IN ('pending', 'processing');
|
||||
@@ -64,6 +64,13 @@
|
||||
"when": 1788906000000,
|
||||
"tag": "0008_email_webhooks",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 9,
|
||||
"version": "7",
|
||||
"when": 1788906100000,
|
||||
"tag": "0009_photo_exports",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user