time clock fixes

This commit is contained in:
2026-06-06 17:18:32 -04:00
parent b0e026c963
commit 3c708b7914
6 changed files with 157 additions and 11 deletions
+11
View File
@@ -0,0 +1,11 @@
ALTER TABLE "beenvoice_time_entry" ADD COLUMN IF NOT EXISTS "invoiceId" varchar(255);
--> statement-breakpoint
DO $$ BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_constraint WHERE conname = 'beenvoice_time_entry_invoiceId_beenvoice_invoice_id_fk'
) THEN
ALTER TABLE "beenvoice_time_entry" ADD CONSTRAINT "beenvoice_time_entry_invoiceId_beenvoice_invoice_id_fk" FOREIGN KEY ("invoiceId") REFERENCES "public"."beenvoice_invoice"("id") ON DELETE set null ON UPDATE no action;
END IF;
END $$;
--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "time_entry_invoice_id_idx" ON "beenvoice_time_entry" USING btree ("invoiceId");
+7
View File
@@ -78,6 +78,13 @@
"when": 1780704000000,
"tag": "0010_time_entries",
"breakpoints": true
},
{
"idx": 11,
"version": "7",
"when": 1749254400000,
"tag": "0011_time_entry_invoice_id",
"breakpoints": true
}
]
}