Initial commit — Shop Manager for Tony Moon
Full auto mechanic shop management tool: jobs, invoices, estimates, inspections, inventory, recommendations, technicians, appointments, reports, file uploads, kanban board, and more. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
16
server/src/migrations/003_misc_items.ts
Normal file
16
server/src/migrations/003_misc_items.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// Sublet/Misc cost line items on jobs — tows, outside machine work, sublet labor, etc.
|
||||
export const up = `
|
||||
CREATE TABLE IF NOT EXISTS misc_items (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
job_id INTEGER NOT NULL,
|
||||
description TEXT NOT NULL,
|
||||
category TEXT DEFAULT 'sublet',
|
||||
your_cost REAL NOT NULL DEFAULT 0,
|
||||
charge_price REAL NOT NULL DEFAULT 0,
|
||||
sort_order INTEGER DEFAULT 0,
|
||||
created_at TEXT DEFAULT (datetime('now')),
|
||||
FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_misc_job ON misc_items(job_id);
|
||||
`;
|
||||
Reference in New Issue
Block a user