-- Venue Events Manager — Database update v1.000.005
-- Invoice show: status control, attachments UI, inline payments (code-only).
-- No schema changes. Import via phpMyAdmin → Import (MySQL / MariaDB).

SET NAMES utf8mb4;

INSERT INTO `settings` (`key`, `value`, `is_encrypted`, `created_at`, `updated_at`)
VALUES ('schema_version', '1.000.005', 0, NOW(), NOW())
ON DUPLICATE KEY UPDATE `value` = '1.000.005', `updated_at` = NOW();

INSERT INTO `settings` (`key`, `value`, `is_encrypted`, `created_at`, `updated_at`)
VALUES ('app_version', '1.000.005', 0, NOW(), NOW())
ON DUPLICATE KEY UPDATE `value` = '1.000.005', `updated_at` = NOW();

INSERT INTO `settings` (`key`, `value`, `is_encrypted`, `created_at`, `updated_at`)
VALUES (
  'release_notes',
  'v1.000.005: Invoice show — Edit Invoice, status dropdown, improved attachments, record/edit multiple payments on the invoice page. Optional demo: database/demo_data.sql.',
  0, NOW(), NOW()
)
ON DUPLICATE KEY UPDATE `value` = VALUES(`value`), `updated_at` = NOW();

SELECT 'Update v1.000.005 applied successfully' AS result;
