Files
shop-manager/server/src/migrations/003_misc_items.ts
tonym 8839412b52 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>
2026-04-07 00:08:35 -05:00

17 lines
589 B
TypeScript

// 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);
`;