mirror of
https://github.com/soconnor0919/beenvoice.git
synced 2025-12-13 17:44:44 -05:00
Add Turso/Vercel deployment configuration
- Updated database connection to support Turso auth token - Added vercel.json with bun build configuration - Updated environment schema for production deployment - Added new features and components for production readiness
This commit is contained in:
29
drizzle/0003_huge_kinsey_walden.sql
Normal file
29
drizzle/0003_huge_kinsey_walden.sql
Normal file
@@ -0,0 +1,29 @@
|
||||
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
||||
CREATE TABLE `__new_beenvoice_invoice` (
|
||||
`id` text(255) PRIMARY KEY NOT NULL,
|
||||
`invoiceNumber` text(100) NOT NULL,
|
||||
`businessId` text(255),
|
||||
`clientId` text(255) NOT NULL,
|
||||
`issueDate` integer NOT NULL,
|
||||
`dueDate` integer NOT NULL,
|
||||
`status` text(50) DEFAULT 'draft' NOT NULL,
|
||||
`totalAmount` real DEFAULT 0 NOT NULL,
|
||||
`taxRate` real DEFAULT 0 NOT NULL,
|
||||
`notes` text(1000),
|
||||
`createdById` text(255) NOT NULL,
|
||||
`createdAt` integer DEFAULT (unixepoch()) NOT NULL,
|
||||
`updatedAt` integer,
|
||||
FOREIGN KEY (`businessId`) REFERENCES `beenvoice_business`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`clientId`) REFERENCES `beenvoice_client`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`createdById`) REFERENCES `beenvoice_user`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
INSERT INTO `__new_beenvoice_invoice`("id", "invoiceNumber", "businessId", "clientId", "issueDate", "dueDate", "status", "totalAmount", "taxRate", "notes", "createdById", "createdAt", "updatedAt") SELECT "id", "invoiceNumber", "businessId", "clientId", "issueDate", "dueDate", "status", "totalAmount", "taxRate", "notes", "createdById", "createdAt", "updatedAt" FROM `beenvoice_invoice`;--> statement-breakpoint
|
||||
DROP TABLE `beenvoice_invoice`;--> statement-breakpoint
|
||||
ALTER TABLE `__new_beenvoice_invoice` RENAME TO `beenvoice_invoice`;--> statement-breakpoint
|
||||
PRAGMA foreign_keys=ON;--> statement-breakpoint
|
||||
CREATE INDEX `invoice_business_id_idx` ON `beenvoice_invoice` (`businessId`);--> statement-breakpoint
|
||||
CREATE INDEX `invoice_client_id_idx` ON `beenvoice_invoice` (`clientId`);--> statement-breakpoint
|
||||
CREATE INDEX `invoice_created_by_idx` ON `beenvoice_invoice` (`createdById`);--> statement-breakpoint
|
||||
CREATE INDEX `invoice_number_idx` ON `beenvoice_invoice` (`invoiceNumber`);--> statement-breakpoint
|
||||
CREATE INDEX `invoice_status_idx` ON `beenvoice_invoice` (`status`);
|
||||
Reference in New Issue
Block a user