- Implemented test scripts for vTiger account retrieval, contact data, and modules. - Created a detailed test suite for the ticket module, covering database schema validation, ticket number generation, prepaid card constraints, and service logic. - Added tests for vTiger field inspection and various queries related to accounts and sales orders. - Introduced SQL migration scripts for the ALSO Cloud Billing foundation, including import jobs, lines, and mapping tables with necessary constraints and indices. - Enhanced workflow columns in the import lines table to support matching and validation timestamps.
14 lines
763 B
SQL
14 lines
763 B
SQL
-- ALSO Cloud Billing workflow columns
|
|
-- Supports matching/validation timestamps and approval linkage to local order drafts.
|
|
|
|
ALTER TABLE also_import_lines
|
|
ADD COLUMN IF NOT EXISTS matching_checked_at TIMESTAMP,
|
|
ADD COLUMN IF NOT EXISTS validation_checked_at TIMESTAMP,
|
|
ADD COLUMN IF NOT EXISTS approved_at TIMESTAMP,
|
|
ADD COLUMN IF NOT EXISTS approved_by_user_id INTEGER REFERENCES users(user_id) ON DELETE SET NULL,
|
|
ADD COLUMN IF NOT EXISTS order_draft_id INTEGER REFERENCES ordre_drafts(id) ON DELETE SET NULL,
|
|
ADD COLUMN IF NOT EXISTS invoiced_at TIMESTAMP;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_also_import_lines_order_draft ON also_import_lines(order_draft_id);
|
|
CREATE INDEX IF NOT EXISTS idx_also_import_lines_approved_at ON also_import_lines(approved_at DESC);
|