feat: Minhas folhas on the server and in Minha conta: saved sheets per account with their uploads, 30 days, 50 per account; order again, edit, delete (Rodada 5, B9)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
15
app/migrations/202611301700_saved-sheets.sql
Normal file
15
app/migrations/202611301700_saved-sheets.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Rodada 5, B9: a customer with an account keeps a built sheet (a cart item)
|
||||
-- in Minhas folhas and asks for it again, edits it or deletes it later.
|
||||
CREATE TABLE IF NOT EXISTS dtf_local.saved_sheets (
|
||||
id uuid PRIMARY KEY,
|
||||
account uuid NOT NULL REFERENCES dtf_local.accounts(id) ON DELETE CASCADE,
|
||||
name text NOT NULL,
|
||||
mode text NOT NULL CHECK (mode IN ('file','avulsa','uvfile','uv','premium')),
|
||||
metres numeric NOT NULL,
|
||||
item jsonb NOT NULL,
|
||||
uploads uuid[] NOT NULL,
|
||||
picture text,
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
used_at timestamptz
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS saved_sheets_account ON dtf_local.saved_sheets(account);
|
||||
Reference in New Issue
Block a user