Files
opensourcepos/app/Database/Migrations/sqlscripts/3.4.2_missing_config_keys.sql
Joe Williams 759356288b Add transactions to missing config keys migration. (#4318)
* `execute_script()` now returns a boolean for error handling.

* Added transaction to `Migration_MissingConfigKeys.up()`.

* Added `executeScriptWithTransaction()` to migration helpers.

* Many changes for testing; also minor formatting fixes.

* Removed test code and pointed the `NullableTaxCategoryId` migration at the right SQL file.

* Fixed header.php

* Code cleanup from code review:
- Added IGNORE to SQL scripts.
- Added try-catch to executeScriptWithTransaction().
- Various comment changes.

* Fixed naming issue

Nullable tax category ID migration now runs the correct script.

* Updated SQL

Replaced INSERT WHERE NOT EXISTS in missing config keys sql script to use a single INSERT IGNORE.

* Updated migration helper

Updated executeScriptWithTransaction to use transRollback

---------

Co-authored-by: Joe Williams <hey-there-joe@outlook.com>
2025-10-15 22:53:14 -07:00

12 lines
293 B
SQL

INSERT IGNORE INTO ospos_app_config (`key`, `value`)
VALUES
('msg_msg', ''),
('msg_pwd', ''),
('msg_uid', ''),
('msg_src', ''),
('smtp_timeout', 5000),
('smtp_crypto', 'tls'),
('smtp_port', 587),
('mailpath', '/usr/bin/sendmail'),
('protocol', 'sendmail');