Server IP : 213.176.29.180  /  Your IP : 3.143.239.234
Web Server : Apache
System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
User : webtaragh ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/webtaragh/public_html/whmcs/resources/test/../sql/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/webtaragh/public_html/whmcs/resources/test/../sql/upgrade880beta1.sql
-- Add new configuration value for OnDemandRenewalsEnabled
set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'OnDemandRenewalsEnabled') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('OnDemandRenewalsEnabled', 0, now(), now());",'DO 0;');
prepare statement from @query;
execute statement;
deallocate prepare statement;

-- Add new configuration value for OnDemandRenewalPeriodMonthly
set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'OnDemandRenewalPeriodMonthly') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('OnDemandRenewalPeriodMonthly', 31, now(), now());",'DO 0;');
prepare statement from @query;
execute statement;
deallocate prepare statement;

-- Add new configuration value for OnDemandRenewalPeriodQuarterly
set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'OnDemandRenewalPeriodQuarterly') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('OnDemandRenewalPeriodQuarterly', 92, now(), now());",'DO 0;');
prepare statement from @query;
execute statement;
deallocate prepare statement;

-- Add new configuration value for OnDemandRenewalPeriodSemiAnnually
set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'OnDemandRenewalPeriodSemiAnnually') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('OnDemandRenewalPeriodSemiAnnually', 183, now(), now());",'DO 0;');
prepare statement from @query;
execute statement;
deallocate prepare statement;

-- Add new configuration value for OnDemandRenewalPeriodAnnually
set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'OnDemandRenewalPeriodAnnually') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('OnDemandRenewalPeriodAnnually', 366, now(), now());",'DO 0;');
prepare statement from @query;
execute statement;
deallocate prepare statement;

-- Add new configuration value for OnDemandRenewalPeriodBiennially
set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'OnDemandRenewalPeriodBiennially') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('OnDemandRenewalPeriodBiennially', 731, now(), now());",'DO 0;');
prepare statement from @query;
execute statement;
deallocate prepare statement;

-- Add new configuration value for OnDemandRenewalPeriodTriennially
set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'OnDemandRenewalPeriodTriennially') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('OnDemandRenewalPeriodTriennially', 1096, now(), now());",'DO 0;');
prepare statement from @query;
execute statement;
deallocate prepare statement;

-- Add new composite index for (merged_ticket_id, status, userid) columns in tbltickets
set @query = if ((SELECT count(INDEX_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = database() AND TABLE_NAME = 'tbltickets' AND INDEX_NAME = 'merged_status_userid') = 0, 'CREATE INDEX `merged_status_userid` ON `tbltickets` (`merged_ticket_id`, `status`, `userid`)', 'DO 0');
prepare statement from @query;
execute statement;
deallocate prepare statement;