bmc_hub/migrations/088_sag_order_lines.sql
Christian 56d6d45aa2 feat(sag): Add Varekøb & Salg module with database migration and frontend template
- Created a new SQL migration for the sag_salgsvarer table to manage sales and purchase items.
- Implemented a new HTML template for the Varekøb & Salg module, including summary cards and tables for sales and purchases.
- Added JavaScript functions for loading and rendering order data dynamically.
- Introduced a new backend search module for customers, contacts, hardware, and locations with autocomplete functionality.
- Developed an email templates API for managing system and customer-specific email templates.
- Created multiple migrations for Nextcloud instances, cache, audit logs, email templates, sag comments, hardware locations, and billing methods.
- Enhanced the sag module with solutions, order lines, work types, and 2FA support for user authentication.
2026-02-02 20:23:56 +01:00

9 lines
340 B
SQL

-- Migration: Add sag_id to tmodule_order_lines
-- Date: 2025-02-02
-- Description: Allows order lines to reference Sag module cases
ALTER TABLE tmodule_order_lines
ADD COLUMN IF NOT EXISTS sag_id INTEGER REFERENCES sag_sager(id) ON DELETE SET NULL;
CREATE INDEX IF NOT EXISTS idx_tmodule_order_lines_sag ON tmodule_order_lines(sag_id);