Server IP : 213.176.29.180  /  Your IP : 3.135.202.168
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/sql/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/webtaragh/public_html/whmcs/resources/sql/upgrade860rc1.sql
-- Add new index (date) for date column in tblactivitylog
set @query = if ((SELECT count(INDEX_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = database() AND TABLE_NAME = 'tblactivitylog' AND INDEX_NAME = 'date') = 0, 'CREATE INDEX `date` ON `tblactivitylog` (`date`)', 'DO 0');
prepare statement from @query;
execute statement;
deallocate prepare statement;

-- Add new index (user) for user column in tblactivitylog
set @query = if ((SELECT count(INDEX_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = database() AND TABLE_NAME = 'tblactivitylog' AND INDEX_NAME = 'user') = 0, 'CREATE INDEX `user` ON `tblactivitylog` (`user`(255))', 'DO 0');
prepare statement from @query;
execute statement;
deallocate prepare statement;

-- Reintroduce table mod_invoicedata in the event it went missing. It had a history of being related to an addon module, and being dynamically created.
CREATE TABLE IF NOT EXISTS `mod_invoicedata` (
    `id` int(10) NOT NULL AUTO_INCREMENT,
    `invoiceid` int(10) NOT NULL,
    `clientsdetails` text COLLATE utf8_unicode_ci NOT NULL,
    `customfields` text COLLATE utf8_unicode_ci NOT NULL,
    `version` varchar(255) COLLATE utf8_unicode_ci NULL,
    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Add new column (version) to mod_invoicedata
set @query = if ((SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = database() AND TABLE_NAME = 'mod_invoicedata' AND COLUMN_NAME  = 'version') = 0, 'ALTER TABLE `mod_invoicedata` ADD `version` VARCHAR(255) COLLATE utf8_unicode_ci NULL AFTER `customfields`', 'DO 0');
prepare statement from @query;
execute statement;
deallocate prepare statement;