Server IP : 213.176.29.180 / Your IP : 18.227.140.100 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 : 8.3.14 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home/webtaragh/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
PK F'Z��u� � upgrade830alpha1.sqlnu �[��� -- Add new field to tbladmins for user_preferences set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladmins' and column_name='user_preferences') = 0, 'ALTER table `tbladmins` ADD `user_preferences` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL AFTER `widget_order`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new permissions for Disputes INSERT INTO `tbladminperms` (`roleid` ,`permid` ) VALUES ('1', '155'),('1', '156'),('1', '157'); -- Add new fields to affiliates tables set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliatespending' and column_name='invoice_id') = 0, 'ALTER TABLE `tblaffiliatespending` ADD `invoice_id` int(10) unsigned NOT NULL DEFAULT 0 AFTER `affaccid`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliatespending' and column_name='created_at') = 0, 'ALTER TABLE `tblaffiliatespending` ADD COLUMN `created_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliatespending' and column_name='updated_at') = 0, 'ALTER TABLE `tblaffiliatespending` ADD COLUMN `updated_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliateshistory' and column_name='invoice_id') = 0, 'ALTER TABLE `tblaffiliateshistory` ADD `invoice_id` int(10) unsigned NOT NULL DEFAULT 0 AFTER `affaccid`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliateshistory' and column_name='created_at') = 0, 'ALTER TABLE `tblaffiliateshistory` ADD COLUMN `created_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliateshistory' and column_name='updated_at') = 0, 'ALTER TABLE `tblaffiliateshistory` ADD COLUMN `updated_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliatesaccounts' and column_name='created_at') = 0, 'ALTER TABLE `tblaffiliatesaccounts` ADD COLUMN `created_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliatesaccounts' and column_name='updated_at') = 0, 'ALTER TABLE `tblaffiliatesaccounts` ADD COLUMN `updated_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliateswithdrawals' and column_name='created_at') = 0, 'ALTER TABLE `tblaffiliateswithdrawals` ADD COLUMN `created_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblaffiliateswithdrawals' and column_name='updated_at') = 0, 'ALTER TABLE `tblaffiliateswithdrawals` ADD COLUMN `updated_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to capture SSL domain validation options set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblsslorders' and column_name='authdata') = 0, 'ALTER table `tblsslorders` ADD `authdata` text COLLATE utf8_unicode_ci DEFAULT NULL AFTER `configdata`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z� a, , upgrade524.sqlnu �[��� UPDATE `tblemailtemplates` SET `message` = '<p>A new support ticket has been flagged to you.</p><p>Ticket #: {$ticket_tid}<br>Client Name: {$client_name} (ID {$client_id})<br>Department: {$ticket_department}<br>Subject: {$ticket_subject}<br>Priority: {$ticket_priority}</p><p>----------------------<br />{$ticket_message}<br />----------------------</p><p><a href="{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}">{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}</a></p>' WHERE name='Support Ticket Flagged'; PK F'Z���� � upgrade533release1.sqlnu �[��� DELETE FROM tbltickettags WHERE ticketid NOT IN (SELECT id FROM tbltickets); DELETE FROM tblticketnotes WHERE ticketid NOT IN (SELECT id FROM tbltickets); DELETE FROM tblticketlog WHERE tid NOT IN (SELECT id FROM tbltickets); DELETE FROM tblcustomfieldsvalues WHERE fieldid IN (SELECT id FROM tblcustomfields WHERE type='client') AND relid NOT IN (SELECT id FROM tblclients); DELETE FROM tblcustomfieldsvalues WHERE fieldid IN (SELECT id FROM tblcustomfields WHERE type='product') AND relid NOT IN (SELECT id FROM tblhosting); DELETE FROM tblcustomfieldsvalues WHERE fieldid IN (SELECT id FROM tblcustomfields WHERE type='support') AND relid NOT IN (SELECT id FROM tbltickets); UPDATE tbladdonmodules SET module='newtlds' WHERE module='enomnewtlds'; PK F'Z�n !v v upgrade370.sqlnu �[��� ALTER TABLE `tbltax` ADD `level` INT( 1 ) NOT NULL AFTER `id` ; UPDATE tbltax SET level='1'; ALTER TABLE `tblinvoices` ADD `tax2` DECIMAL( 10, 2 ) NOT NULL AFTER `tax` ; ALTER TABLE `tblinvoices` ADD `taxrate2` DECIMAL( 10, 2 ) NOT NULL AFTER `taxrate` ; INSERT INTO `tblconfiguration` (`setting`,`value` ) VALUES ('TaxL2Compound',''); INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES ('support', 'Support Ticket Auto Close Notification', 'Support Ticket Resolved', '<p>[CustomerName],</p><p>This is a notification to let you know that we are changing the status of your ticket #[TicketID] to Closed as we have not received a response from you in over [AutoCloseTime] hours.</p><p>Subject: [Subject]<br>Department: [Department]<br>Priority: [Priority]<br>Status: [Status]</p><p>If you have any further questions then please just reply to re-open the ticket.</p><p>[Signature]</p>', '', '', '', '', '', '', '0'); INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES ('invoice', 'Credit Card Payment Due', 'Invoice Payment Reminder', '<p>Dear [CustomerName],</p><p>This is a notice to remind you that you have an invoice due on [DueDate]. We tried to bill you automatically but were unable to because we don\'t have your credit card details on file.</p><p>Invoice Date: [InvoiceDate]<br>Invoice #[InvoiceNo]<br>Amount Due: [AmountDue]<br>Due Date: [DueDate]</p><p>Please login to our client area at the link below to submit your card details or make payment using a different method.</p><p>[InvoiceLink]</p><p>[Signature]</p>', '', '', '', '', '', '', '0'); ALTER TABLE `tblclients` ADD `latefeeoveride` TEXT NOT NULL AFTER `taxexempt` ; ALTER TABLE `tblclients` ADD `overideduenotices` TEXT NOT NULL AFTER `latefeeoveride` ; UPDATE tblproductconfigoptions SET optiontype='1'; ALTER TABLE `tblhostingconfigoptions` ADD `qty` INT( 10 ) NOT NULL ; ALTER TABLE `tblpromotions` DROP `item`, DROP `addons`; ALTER TABLE `tblpromotions` CHANGE `code` `code` TEXT NOT NULL AFTER id, CHANGE `type` `recurring` INT(1) AFTER code, CHANGE `discount` `type` TEXT NOT NULL AFTER code, CHANGE `appliesto` `cycles` TEXT NOT NULL AFTER value, CHANGE `packages` `appliesto` TEXT NOT NULL AFTER cycles; UPDATE tblpromotions SET recurring='1' WHERE type='Recurring'; ALTER TABLE `tblpromotions` ADD `applyonce` INT( 1 ) NOT NULL, ADD `newsignups` INT( 1 ) NOT NULL ; UPDATE tblpromotions SET type='Fixed Amount' WHERE type='Money Value'; INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'product', 'Cancellation Request Confirmation', 'Cancellation Request Confirmation', '<p>Dear {$client_name},</p><p>This email is to confirm that we have received your cancellation request for the service listed below.</p><p>Product/Service: {$service_product_name}<br />Domain: {$service_domain}</p><p>If you requested immediate cancellation then the service will be terminated within the next 24 hours. If however you chose end of billing cycle, it will not be cancelled until {$service_next_due_date}.</p><p>Thank you for using {$company_name} and we hope to see you again in the future.</p><p>{$signature}</p>', '', '', '', '', '', '', '0'); ALTER TABLE `tbltickets` ADD `service` TEXT NOT NULL ; ALTER TABLE `tblaffiliatesaccounts` DROP `domain`, DROP `package`, DROP `billingcycle`, DROP `regdate`, DROP `amount`, DROP `commission`; ALTER TABLE `tblaffiliatesaccounts` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `relid` `relid` INT( 10 ) NOT NULL AFTER affiliateid; DROP TABLE IF EXISTS `tblaffiliateswithdrawals`; CREATE TABLE IF NOT EXISTS `tblaffiliateswithdrawals` ( `id` int(10) NOT NULL auto_increment, `affiliateid` int(10) NOT NULL, `date` date NOT NULL, `amount` decimal(10,2) NOT NULL, PRIMARY KEY (`id`), KEY `affiliateid` (`affiliateid`)) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `tblservers` ADD `hostname` TEXT NOT NULL AFTER `ipaddress` ; PK F'Zo�%v� � upgrade700beta2.sqlnu �[��� -- editor to tblticketescalations -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblticketescalations' and column_name='editor') = 0, 'ALTER TABLE tblticketescalations ADD `editor` enum(\'plain\',\'markdown\') COLLATE utf8_unicode_ci NOT NULL DEFAULT \'plain\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z1?� � upgrade760alpha1.sqlnu �[��� -- Add the target_php_version column to tblioncube_file_log set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblioncube_file_log' and column_name='target_php_version') = 0, 'alter table `tblioncube_file_log` add `target_php_version` CHAR(16) NOT NULL DEFAULT \'\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- update MaxMind Configuration UPDATE `tblfraud` SET `setting` = 'licenseKey' WHERE `setting` = 'MaxMind License Key' AND `fraud` = 'maxmind'; UPDATE `tblfraud` SET `setting` = 'riskScore' WHERE `setting` = 'MaxMind Fraud Risk Score' AND `fraud` = 'maxmind'; UPDATE `tblfraud` SET `setting` = 'ignoreAddressValidation' WHERE `setting` = 'Do Not Validate Address Information' AND `fraud` = 'maxmind'; UPDATE `tblfraud` SET `setting` = 'rejectFreeEmail' WHERE `setting` = 'Reject Free Email Service' AND `fraud` = 'maxmind'; UPDATE `tblfraud` SET `setting` = 'rejectCountryMismatch' WHERE `setting` = 'Reject Country Mismatch' AND `fraud` = 'maxmind'; UPDATE `tblfraud` SET `setting` = 'rejectAnonymousNetwork' WHERE `setting` = 'Reject Anonymous Proxy' AND `fraud` = 'maxmind'; UPDATE `tblfraud` SET `setting` = 'rejectHighRiskCountry' WHERE `setting` = 'Reject High Risk Country' AND `fraud` = 'maxmind'; DELETE FROM `tblfraud` WHERE `setting` IN ('Use New Risk Score', 'Service Type', 'Force Phone Verify Products') AND `fraud` = 'maxmind'; -- Change enum to include bbcode for editor column in tbltickets ALTER TABLE `tbltickets` CHANGE `editor` `editor` ENUM('plain','markdown','bbcode') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'plain'; PK F'Z��"g g upgrade431.sqlnu �[��� UPDATE `tblconfiguration` SET value='cart' where setting = 'OrderFormTemplate' and value='singlepage'; PK F'Z�y�� � upgrade630alpha1.sqlnu �[��� -- Add the created_at column to tblcustomfields set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblcustomfields' and column_name='created_at') = 0, 'alter table tblcustomfields add `created_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\' AFTER `sortorder`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add the updated_at column to tblcustomfields set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblcustomfields' and column_name='updated_at') = 0, 'alter table tblcustomfields add `updated_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\' AFTER `created_at`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- attachments to ticket notes set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblticketnotes' and column_name='attachments') = 0, 'ALTER TABLE tblticketnotes ADD `attachments` TEXT NOT NULL AFTER `message`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- merged_ticket_id to tbltickets set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbltickets' and column_name='merged_ticket_id') = 0, 'ALTER TABLE tbltickets ADD `merged_ticket_id` integer NOT NULL DEFAULT 0', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.STATISTICS where table_schema=database() and table_name='tbltickets' and index_name='merged_ticket_id') = 0, 'CREATE INDEX `merged_ticket_id` ON `tbltickets` (`merged_ticket_id`,`id`)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add email_verified to tblclients. set @query = if ( (select count(*) from information_schema.columns where table_schema=database() and table_name='tblclients' and column_name='email_verified') = 0, 'ALTER TABLE `tblclients` add `email_verified` tinyint(1) NOT NULL DEFAULT 0 AFTER `allow_sso`', 'DO 0' ); prepare statement from @query; execute statement; deallocate prepare statement; -- Insert Email Verification email template. set @query = if ( (select count(*) from tblemailtemplates where name = 'Client Email Address Verification') = 0, 'INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`, `message`) VALUES (\'general\', \'Client Email Address Verification\', \'Confirm Your Registration\', \'<p>Dear {$client_name},</p><p>Thank you for creating a {$companyname} account.</p><p>Please visit the link below and sign into your account to verify your email address and complete your registration.</p><p>{$client_email_verification_link}</p><p>You are receiving this email because you recently created an account or changed your email address. If you did not do this, please contact us.</p><p>{$signature}</p>\')', 'DO 0' ); prepare statement from @query; execute statement; deallocate prepare statement; -- Create translations table CREATE TABLE IF NOT EXISTS `tbldynamic_translations` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `related_type` enum('configurable_option.{id}.name','configurable_option_option.{id}.name','custom_field.{id}.description','custom_field.{id}.name','download.{id}.description','download.{id}.title','product.{id}.description','product.{id}.name','product_addon.{id}.description','product_addon.{id}.name','product_bundle.{id}.description','product_bundle.{id}.name','product_group.{id}.headline','product_group.{id}.name','product_group.{id}.tagline','product_group_features.{id}.feature','ticket_department.{id}.description','ticket_department.{id}.name') NOT NULL, `related_id` int(10) unsigned NOT NULL DEFAULT 0, `language` varchar(16) NOT NULL DEFAULT '', `translation` text NOT NULL, `input_type` enum('text','textarea') NOT NULL, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), KEY `tbldynamic_translations_id` (`related_id`), KEY `tbldynamic_translations_type` (`related_type`), KEY `tbldynamic_translations_id_type` (`related_id`, `related_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tblticket_watchers` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ticket_id` int(10) unsigned NOT NULL DEFAULT 0, `admin_id` int(10) unsigned NOT NULL DEFAULT 0, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `admin_ticket_unique` (`ticket_id`,`admin_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Remove partial index and replace with full column index so its used more often CORE-6368 DROP INDEX `status` on `tbltickets`; CREATE INDEX `status` ON `tbltickets` (status); PK F'Z��%>� � upgrade820alpha1.sqlnu �[��� -- Add new field to tbltickets for ipaddress set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbltickets' and column_name='ipaddress') = 0, 'ALTER table `tbltickets` ADD `ipaddress` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL AFTER `c`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Create index to improve user/client lookups set @query = if ((SELECT count(*) FROM (SELECT GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) idx_cols FROM information_schema.statistics WHERE table_schema=database() AND TABLE_NAME='tblusers_clients' GROUP BY INDEX_NAME) i WHERE idx_cols = 'client_id,owner') = 0, 'ALTER TABLE `tblusers_clients` ADD INDEX `client_id_owner_idx` (`client_id`, `owner`);', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblbillableitems for unit tracking set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblbillableitems' and column_name='unit') = 0, 'ALTER table `tblbillableitems` ADD `unit` tinyint(1) NOT NULL DEFAULT \'0\' AFTER `invoiceaction`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblorders to track associated Requestor ID set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblorders' and column_name='requestor_id') = 0, 'ALTER TABLE `tblorders` ADD `requestor_id` INT(10) UNSIGNED NOT NULL DEFAULT \'0\' AFTER `contactid`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblorders to track associated Admin Requestor ID set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblorders' and column_name='admin_requestor_id') = 0, 'ALTER TABLE `tblorders` ADD `admin_requestor_id` INT(10) UNSIGNED NOT NULL DEFAULT \'0\' AFTER `requestor_id`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tbladdons for prorate set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladdons' and column_name='prorate') = 0, 'ALTER TABLE `tbladdons` ADD `prorate` TINYINT(1) NOT NULL DEFAULT \'0\' AFTER `server_group_id`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblhostingaddons for proratadate set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblhostingaddons' and column_name='proratadate') = 0, 'ALTER TABLE `tblhostingaddons` ADD `proratadate` DATE NOT NULL DEFAULT \'0000-00-00\' AFTER `termination_date`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblhostingaddons for firstpaymentamount set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblhostingaddons' and column_name='firstpaymentamount') = 0, 'ALTER TABLE `tblhostingaddons` ADD `firstpaymentamount` DECIMAL(16,2) NOT NULL DEFAULT \'0.00\' AFTER `qty`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new permission for View Gateway Balance Data INSERT INTO `tbladminperms` (`roleid` ,`permid` ) VALUES ('1', '154'); PK F'Z?�dШ � upgrade771release1.sqlnu �[��� -- Add the last_error column to tblstorageconfigurations set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblstorageconfigurations' and column_name='last_error') = 0, 'alter table `tblstorageconfigurations` add `last_error` TEXT COLLATE utf8_unicode_ci AFTER `settings`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z�% �� � upgrade760release1.sqlnu �[��� -- Geotargeted Results in tblconfiguration INSERT INTO tbldomain_lookup_configuration (`registrar`, `setting`, `value`, `created_at`, `updated_at`) VALUES ('WhmcsWhois', 'geotargetedResults', 'on', NOW(), NOW()); PK F'Z��mv� � upgrade780release1.sqlnu �[��� -- Add AcceptedCardTypes setting to tblconfiguration set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'AcceptedCardTypes') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('AcceptedCardTypes', 'Visa,MasterCard,Discover,American Express,JCB,Diners Club', now(), now());",'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z���� upgrade361.sqlnu �[��� ALTER TABLE `tblproductconfigoptionssub` CHANGE `price` `monthly` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00' ; ALTER TABLE `tblproductconfigoptionssub` ADD `quarterly` DECIMAL( 10, 2 ) NOT NULL ,ADD `semiannual` DECIMAL( 10, 2 ) NOT NULL ,ADD `annual` DECIMAL( 10, 2 ) NOT NULL ,ADD `biennial` DECIMAL( 10, 2 ) NOT NULL ; UPDATE tblproductconfigoptionssub SET quarterly=monthly*3,semiannual=monthly*6,annual=monthly*12,biennial=monthly*24; ALTER TABLE `tblclients` CHANGE `status` `status` ENUM( 'Active', 'Inactive', 'Closed' ) NOT NULL DEFAULT 'Active' ; ALTER TABLE `tbldomains` CHANGE `status` `status` ENUM( 'Pending', 'Pending Transfer', 'Active', 'Expired', 'Cancelled', 'Fraud' ) NOT NULL DEFAULT 'Pending'; ALTER TABLE `tbldomains` ADD `donotrenew` TEXT NOT NULL ; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('BulkDomainSearchEnabled', 'on'); INSERT INTO `tblconfiguration` (`setting`,`value`) VALUES ('AutoRenewDomainsonPayment','on'); INSERT INTO `tblconfiguration` (`setting`,`value`) VALUES ('DomainAutoRenewDefault','on'); PK F'Z���� � upgrade810rc1.sqlnu �[��� -- Add new index to tbllog_register for namespace_id set @query = if ((select count(*) from information_schema.statistics where table_schema=database() and table_name='tbllog_register' and column_name='namespace_id') = 0, 'CREATE INDEX tbllog_register_namespace_id_index ON tbllog_register (namespace_id);', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new index to tbllog_register for namespace set @query = if ((select count(*) from information_schema.statistics where table_schema=database() and table_name='tbllog_register' and column_name='namespace') = 0, 'CREATE INDEX tbllog_register_namespace_index ON tbllog_register (namespace(32));', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new index to tbllog_register for created_at set @query = if ((select count(*) from information_schema.statistics where table_schema=database() and table_name='tbllog_register' and column_name='created_at') = 0, 'CREATE INDEX tbllog_register_created_at_index ON tbllog_register (created_at);', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z��g_* * upgrade501.sqlnu �[��� ALTER TABLE `tblclients` ADD `defaultgateway` TEXT NOT NULL AFTER `currency` ; ALTER TABLE `tbltickets` ADD `contactid` INT(10) NOT NULL AFTER `userid`; ALTER TABLE `tblticketreplies` ADD `contactid` INT(10) NOT NULL AFTER `userid`; ALTER TABLE `tbldownloads` ADD `hidden` TEXT NOT NULL AFTER `clientsonly`; ALTER TABLE `tblorders` ADD `orderdata` TEXT NOT NULL AFTER `promovalue` ; INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES ('2', '71'), ('2', '73'), ('1', '104'), ('2', '104'), ('1', '105'), ('2', '105'), ('3', '105'), ('1', '106'), ('1', '107'), ('1', '108'), ('1', '109'), ('1', '110'), ('2', '110'), ('1', '111'), ('1', '112'), ('1', '113'), ('1', '114'), ('1', '115'), ('1', '116'), ('1', '117'), ('1', '118'), ('1', '119'), ('1', '120'), ('2', '120'); UPDATE `tbladmins` SET template='blend' WHERE template='simple'; ALTER TABLE `tblclients` ADD `bankname` TEXT NOT NULL AFTER `issuenumber`, ADD `banktype` TEXT NOT NULL AFTER `bankname`, ADD `bankcode` BLOB NOT NULL AFTER `banktype`, ADD `bankacct` BLOB NOT NULL AFTER `bankcode`; PK F'ZD#� upgrade880beta1.sqlnu �[��� -- 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; PK F'Z/1�<a a upgrade430.sqlnu �[��� ALTER TABLE `tbladdons` ADD `weight` INT( 2 ) NOT NULL DEFAULT '0'; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CreateInvoiceDaysBeforeMonthly', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CreateInvoiceDaysBeforeQuarterly', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CreateInvoiceDaysBeforeSemiAnnually', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CreateInvoiceDaysBeforeAnnually', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CreateInvoiceDaysBeforeBiennially', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CreateInvoiceDaysBeforeTriennially', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('ClientsProfileUneditableFields', ''); ALTER TABLE `tblhosting` ADD `suspendreason` TEXT NOT NULL AFTER `promoid` ; UPDATE `tblemailtemplates` SET `name` = 'Service Suspension Notification',`subject` = 'Service Suspension Notification',`message` = '<p>Dear {$client_name},</p><p>This is a notification that your service has now been suspended. The details of this suspension are below:</p><p>Product/Service: {$service_product_name}<br />{if $service_domain}Domain: {$service_domain}<br />{/if}Amount: {$service_recurring_amount}<br />Due Date: {$service_next_due_date}<br />Suspension Reason: <strong>{$service_suspension_reason}</strong></p><p>Please contact us as soon as possible to get your service reactivated.</p><p>{$signature}</p>' WHERE `name` = 'Account Suspended'; ALTER TABLE `tblpromotions` ADD `recurfor` INT( 3 ) NOT NULL ; INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'admin', 'Automatic Setup Failed', 'WHMCS Automatic Setup Failed', '<p>An order has received its first payment but the automatic provisioning has failed and requires you to manually check & resolve.</p>\r\n<p>Client ID: {$client_id}<br />{if $service_id}Service ID: {$service_id}<br />Product/Service: {$service_product}<br />Domain: {$service_domain}{else}Domain ID: {$domain_id}<br />Registration Type: {$domain_type}<br />Domain: {$domain_name}{/if}<br />Error: {$error_msg}</p>\r\n<p>{$whmcs_admin_link}</p>', '', '', '', '', '', '', 0),(NULL, 'admin', 'Automatic Setup Successful', 'WHMCS Automatic Setup Successful', '<p>An order has received its first payment and the product/service has been automatically provisioned successfully.</p>\r\n<p>Client ID: {$client_id}<br />{if $service_id}Service ID: {$service_id}<br />Product/Service: {$service_product}<br />Domain: {$service_domain}{else}Domain ID: {$domain_id}<br />Registration Type: {$domain_type}<br />Domain: {$domain_name}{/if}</p>\r\n<p>{$whmcs_admin_link}</p>', '', '', '', '', '', '', 0),(NULL, 'admin', 'Domain Renewal Failed', 'WHMCS Automatic Domain Renewal Failed', '<p>An invoice for the renewal of a domain has been paid but the renewal request submitted to the registrar failed.</p>\r\n<p>Client ID: {$client_id}<br />Domain ID: {$domain_id}<br />Domain Name: {$domain_name}<br />Error: {$error_msg}</p>\r\n<p>{$whmcs_admin_link}</p>', '', '', '', '', '', '', 0),(NULL, 'admin', 'Domain Renewal Successful', 'WHMCS Automatic Domain Renewal Successful', '<p>An invoice for the renewal of a domain has been paid and the renewal request was submitted to the registrar successfully.</p>\r\n<p>Client ID: {$client_id}<br />Domain ID: {$domain_id}<br />Domain Name: {$domain_name}</p>\r\n<p>{$whmcs_admin_link}</p>', '', '', '', '', '', '', 0),(NULL, 'admin', 'New Order Notification', 'WHMCS New Order Notification', '<p><strong>Order Information</strong></p>\r\n<p>Order ID: {$order_id}<br />\r\nOrder Number: {$order_number}<br />\r\nDate/Time: {$order_date}<br />\r\nInvoice Number: {$invoice_id}<br />\r\nPayment Method: {$order_payment_method}</p>\r\n<p><strong>Customer Information</strong></p>\r\n<p>Customer ID: {$client_id}<br />\r\nName: {$client_first_name} {$client_last_name}<br />\r\nEmail: {$client_email}<br />\r\nCompany: {$client_company_name}<br />\r\nAddress 1: {$client_address1}<br />\r\nAddress 2: {$client_address2}<br />\r\nCity: {$client_city}<br />\r\nState: {$client_state}<br />\r\nPostcode: {$client_postcode}<br />\r\nCountry: {$client_country}<br />\r\nPhone Number: {$client_phonenumber}</p>\r\n<p><strong>Order Items</strong></p>\r\n<p>{$order_items}</p>\r\n{if $order_notes}<p><strong>Order Notes</strong></p>\r\n<p>{$order_notes}</p>{/if}\r\n<p><strong>ISP Information</strong></p>\r\n<p>IP: {$client_ip}<br />\r\nHost: {$client_hostname}</p><p><a href="{$whmcs_admin_url}orders.php?action=view&id={$order_id}">{$whmcs_admin_url}orders.php?action=view&id={$order_id}</a></p>', '', '', '', '', '', '', 0),(NULL, 'admin', 'Service Unsuspension Failed', 'WHMCS Service Unsuspension Failed', '<p>This product/service has received its next payment but the automatic reactivation has failed.</p>\r\n<p>Client ID: {$client_id}<br />Service ID: {$service_id}<br />Product/Service: {$service_product}<br />Domain: {$service_domain}<br />Error: {$error_msg}</p>\r\n<p>{$whmcs_admin_link}</p>', '', '', '', '', '', '', 0),(NULL, 'admin', 'Service Unsuspension Successful', 'WHMCS Service Unsuspension Successful', '<p>This product/service has received its next payment and has been reactivated successfully.</p>\r\n<p>Client ID: {$client_id}<br />Service ID: {$service_id}<br />Product/Service: {$service_product}<br />Domain: {$service_domain}</p>\r\n<p>{$whmcs_admin_link}</p>', '', '', '', '', '', '', 0),(NULL, 'admin', 'Support Ticket Created', '[Ticket ID: {$ticket_tid}] New Support Ticket Opened', '<p>A new support ticket has been opened.</p>\r\n<p>Client: {$client_name}{if $client_id} #{$client_id}{/if}<br />Department: {$ticket_department}<br />Subject: {$ticket_subject}<br />Priority: {$ticket_priority}</p>\r\n<p>---<br />{$ticket_message}<br />---</p>\r\n<p>You can respond to this ticket by simply replying to this email or through the admin area at the url below.</p>\r\n<p><a href="{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}">{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}</a></p>', '', '', '', '', '', '', 0),(NULL, 'admin', 'Support Ticket Response', '[Ticket ID: {$ticket_tid}] New Support Ticket Response', '<p>A new support ticket response has been made.</p>\r\n<p>Client: {$client_name}{if $client_id} #{$client_id}{/if} <br />Department: {$ticket_department} <br />Subject: {$ticket_subject} <br />Priority: {$ticket_priority}</p>\r\n<p>--- <br />{$ticket_message} <br />---</p>\r\n<p>You can respond to this ticket by simply replying to this email or through the admin area at the url below.</p>\r\n<p><a href="{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}">{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}</a></p>', '', '', '', '', '', '', 0); UPDATE `tblconfiguration` SET value='ssl' where setting = 'SMTPSSL' and value='on'; PK F'Z�� �8 �8 upgrade362.sqlnu �[��� ALTER TABLE `tblannouncements` CHANGE `date` `date` DATETIME NULL DEFAULT NULL ; ALTER TABLE `tblaccounts` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `userid` `userid` INT( 10 ) NOT NULL,CHANGE `invoiceid` `invoiceid` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX invoiceid ON tblaccounts (invoiceid); CREATE INDEX userid ON tblaccounts (userid); CREATE INDEX date ON tblaccounts (date); CREATE INDEX transid ON tblaccounts (transid(32)); ALTER TABLE `tblactivitylog` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; ALTER TABLE `tbladdons` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX name ON tbladdons (name(32)); ALTER TABLE `tbladminlog` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX logouttime ON tbladminlog (logouttime); CREATE INDEX roleid_permid ON tbladminperms (roleid,permid); ALTER TABLE `tbladmins` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX username ON tbladmins (username(32)); ALTER TABLE `tblaffiliates` CHANGE `clientid` `clientid` INT( 10 ) NOT NULL ; CREATE INDEX affiliateid ON tblaffiliates (id); CREATE INDEX clientid ON tblaffiliates (clientid); ALTER TABLE `tblaffiliates` DROP PRIMARY KEY; ALTER TABLE `tblaffiliatesaccounts` CHANGE `id` `id` INT( 1 ) NOT NULL AUTO_INCREMENT ; ALTER TABLE `tblaffiliatesaccounts` CHANGE `affiliateid` `affiliateid` INT( 10 ) NOT NULL ; CREATE INDEX affiliateid ON tblaffiliatesaccounts (affiliateid); ALTER TABLE `tblaffiliateshistory` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `affiliateid` `affiliateid` INT( 10 ) NOT NULL , CHANGE `affaccid` `affaccid` INT( 10 ) NOT NULL ; CREATE INDEX affiliateid ON tblaffiliateshistory (affiliateid); ALTER TABLE `tblaffiliatespending` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `affaccid` `affaccid` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX clearingdate ON tblaffiliatespending (clearingdate); ALTER TABLE `tblannouncements` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX date ON tblannouncements (date); ALTER TABLE `tblbannedemails` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `count` `count` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX domain ON tblbannedemails (domain(64)); ALTER TABLE `tblbannedips` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX ip ON tblbannedips (ip(32)); ALTER TABLE `tblbrowserlinks` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX name ON tblbrowserlinks (name(32)); ALTER TABLE `tblcalendar` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `adminid` `adminid` INT( 10 ) NOT NULL ; CREATE INDEX day_month_year ON tblcalendar (day(2),month(2),year(4)); ALTER TABLE `tblcancelrequests` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `relid` `relid` INT( 10 ) NOT NULL ; CREATE INDEX serviceid ON tblcancelrequests (relid); ALTER TABLE `tblclients` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `billingcid` `billingcid` INT( 10 ) NOT NULL ; CREATE INDEX firstname_lastname ON tblclients (firstname(32),lastname(32)); CREATE INDEX email ON tblclients (email(64)); CREATE INDEX setting ON tblconfiguration (setting(32)); CREATE INDEX userid_firstname_lastname ON tblcontacts (userid,firstname(32),lastname(32)); ALTER TABLE `tblcontacts` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `userid` `userid` INT( 10 ) NOT NULL ; CREATE INDEX email ON tblcontacts (email(64)); ALTER TABLE `tblcredit` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `clientid` `clientid` INT( 10 ) NOT NULL ; ALTER TABLE `tblcustomfields` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `relid` `relid` INT( 10 ) NOT NULL ; CREATE INDEX serviceid ON tblcustomfields (relid); ALTER TABLE `tblcustomfieldsvalues` CHANGE `fieldid` `fieldid` INT( 10 ) NOT NULL , CHANGE `relid` `relid` INT( 10 ) NOT NULL ; CREATE INDEX fieldid_relid ON tblcustomfieldsvalues (fieldid,relid); ALTER TABLE `tbldomainpricing` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX extension_registrationperiod ON tbldomainpricing (extension(32),registrationperiod); CREATE INDEX `order` ON tbldomainpricing (`order`); ALTER TABLE `tbldomains` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `userid` `userid` INT( 10 ) NOT NULL ; CREATE INDEX userid ON tbldomains (userid); CREATE INDEX orderid ON tbldomains (orderid); CREATE INDEX domain ON tbldomains (domain(64)); CREATE INDEX status ON tbldomains (status); ALTER TABLE `tbldomainsadditionalfields` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `domainid` `domainid` INT( 10 ) NOT NULL ; CREATE INDEX domainid ON tbldomainsadditionalfields (domainid); ALTER TABLE `tbldownloadcats` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `parentid` `parentid` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX parentid ON tbldownloadcats (parentid); ALTER TABLE `tbldownloads` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `category` `category` INT( 10 ) NOT NULL AFTER id , CHANGE `downloads` `downloads` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX title ON tbldownloads (title(32)); ALTER TABLE `tbldownloads` ADD INDEX ( `downloads` ) ; ALTER TABLE `tblemails` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT , CHANGE `userid` `userid` INT( 10 ) NOT NULL ; CREATE INDEX userid ON tblemails (userid); ALTER TABLE `tblemailtemplates` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX type ON tblemailtemplates (type(32)); CREATE INDEX name ON tblemailtemplates (name(64)); ALTER TABLE `tblfraud` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX fraud ON tblfraud (fraud(32)); ALTER TABLE `tblgatewaylog` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; ALTER TABLE `tblhosting` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `userid` `userid` INT( 10 ) NOT NULL ,CHANGE `orderid` `orderid` INT( 10 ) NOT NULL ,CHANGE `packageid` `packageid` INT( 10 ) NOT NULL AFTER `orderid` ,CHANGE `server` `server` INT( 10 ) NOT NULL AFTER `packageid`; UPDATE tblhosting SET password=rootpassword WHERE password='' AND rootpassword!=''; ALTER TABLE `tblhosting` DROP `rootpassword` ; CREATE INDEX serviceid ON tblhosting (id); CREATE INDEX userid ON tblhosting (userid); CREATE INDEX orderid ON tblhosting (orderid); CREATE INDEX productid ON tblhosting (packageid); CREATE INDEX serverid ON tblhosting (server); CREATE INDEX domain ON tblhosting (domain(64)); CREATE INDEX domainstatus ON tblhosting (domainstatus); ALTER TABLE `tblhostingaddons` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `orderid` `orderid` INT( 10 ) NOT NULL ,CHANGE `hostingid` `hostingid` INT( 10 ) NOT NULL ; ALTER TABLE `tblhostingaddons` ADD INDEX ( `orderid` ) ; CREATE INDEX serviceid ON tblhostingaddons (hostingid); CREATE INDEX name ON tblhostingaddons (name(32)); CREATE INDEX status ON tblhostingaddons (status); ALTER TABLE `tblhostingconfigoptions` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `relid` `relid` INT( 10 ) NOT NULL ,CHANGE `configid` `configid` INT( 10 ) NOT NULL ,CHANGE `optionid` `optionid` INT( 10 ) NOT NULL ; CREATE INDEX relid_configid ON tblhostingconfigoptions (relid,configid); ALTER TABLE `tblinvoiceitems` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `invoiceid` `invoiceid` INT( 10 ) NOT NULL DEFAULT '0' , CHANGE `userid` `userid` INT( 10 ) NOT NULL ,CHANGE `relid` `relid` INT( 10 ) NOT NULL ; ALTER TABLE `tblinvoiceitems` ADD INDEX ( `invoiceid` ) ; ALTER TABLE `tblinvoices` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `userid` `userid` INT( 10 ) NOT NULL AFTER `id`; ALTER TABLE `tblinvoices` ADD INDEX ( `userid` ) ; CREATE INDEX status ON tblinvoices (status(3)); ALTER TABLE `tblknowledgebase` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `category` `category` INT( 10 ) NOT NULL DEFAULT '0',CHANGE `views` `views` INT( 10 ) NOT NULL DEFAULT '0',CHANGE `useful` `useful` INT( 10 ) NOT NULL DEFAULT '0',CHANGE `votes` `votes` INT( 10 ) NOT NULL DEFAULT '0' ; ALTER TABLE `tblknowledgebasecats` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `parentid` `parentid` INT( 10 ) NOT NULL DEFAULT '0' ; ALTER TABLE `tblknowledgebasecats` ADD INDEX ( `parentid` ) ; CREATE INDEX name ON tblknowledgebasecats (name(64)); ALTER TABLE `tbllinks` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `clicks` `clicks` INT( 10 ) NOT NULL ,CHANGE `conversions` `conversions` INT( 10 ) NOT NULL ; CREATE INDEX name ON tbllinks (name(64)); ALTER TABLE `tblnotes` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `userid` `userid` INT( 10 ) NOT NULL ,CHANGE `adminid` `adminid` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX userid ON tblnotes (userid); ALTER TABLE `tblorders` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `userid` `userid` INT( 10 ) NOT NULL ,CHANGE `contactid` `contactid` INT( 10 ) NOT NULL ,CHANGE `invoiceid` `invoiceid` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX ordernum ON tblorders (ordernum); CREATE INDEX userid ON tblorders (userid); CREATE INDEX contactid ON tblorders (contactid); CREATE INDEX date ON tblorders (date); ALTER TABLE `tblpaymentgateways` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX gateway_setting ON tblpaymentgateways (gateway(32),setting(32)); CREATE INDEX setting_value ON tblpaymentgateways (setting(32),value(32)); ALTER TABLE `tblproductconfigoptions` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `productid` `productid` INT( 10 ) NOT NULL ; ALTER TABLE `tblproductconfigoptions` ADD INDEX ( `productid` ) ; ALTER TABLE `tblproductconfigoptionssub` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `configid` `configid` INT( 10 ) NOT NULL ; CREATE INDEX configid ON tblproductconfigoptionssub (configid); CREATE INDEX `order` ON tblproductgroups (`order`); ALTER TABLE `tblproductgroups` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; ALTER TABLE `tblproducts` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `gid` `gid` INT( 10 ) NOT NULL ,CHANGE `welcomeemail` `welcomeemail` INT( 1 ) NOT NULL DEFAULT '0',CHANGE `qty` `qty` INT( 1 ) NOT NULL DEFAULT '0',CHANGE `defaultserver` `defaultserver` INT( 1 ) NOT NULL DEFAULT '0' ; CREATE INDEX gid ON tblproducts (gid); CREATE INDEX name ON tblproducts (name(64)); ALTER TABLE `tblpromotions` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `maxuses` `maxuses` INT( 10 ) NOT NULL DEFAULT '0',CHANGE `uses` `uses` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX code ON tblpromotions (code(32)); ALTER TABLE `tblregistrars` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX registrar_setting ON tblregistrars(registrar(32),setting(32)); ALTER TABLE `tblservers` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `maxaccounts` `maxaccounts` INT( 10 ) NOT NULL DEFAULT '0' ; ALTER TABLE `tbltax` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX state_country ON tbltax (state(32),country(2)); ALTER TABLE `tblticketbreaklines` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; ALTER TABLE `tblticketdepartments` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; CREATE INDEX name ON tblticketdepartments (name(64)); ALTER TABLE `tblticketlog` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `tid` `tid` INT( 10 ) NOT NULL ; CREATE INDEX tid ON tblticketlog (tid); ALTER TABLE `tblticketmaillog` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; ALTER TABLE `tblticketnotes` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `ticketid` `ticketid` INT( 10 ) NOT NULL AFTER `id`; CREATE INDEX ticketid_date ON tblticketnotes (ticketid,date); ALTER TABLE `tblticketpredefinedcats` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `parentid` `parentid` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX parentid_name ON tblticketpredefinedcats (parentid,name(64)); ALTER TABLE `tblticketpredefinedreplies` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `catid` `catid` INT( 10 ) NOT NULL ; ALTER TABLE `tblticketreplies` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `tid` `tid` INT( 10 ) NOT NULL ,CHANGE `userid` `userid` INT( 10 ) NOT NULL ; CREATE INDEX tid_date ON tblticketreplies (tid,date); ALTER TABLE `tbltickets` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `did` `did` INT( 10 ) NOT NULL ,CHANGE `userid` `userid` INT( 10 ) NOT NULL ; CREATE INDEX tid_c ON tbltickets (tid,c(64)); CREATE INDEX userid ON tbltickets (userid); CREATE INDEX status ON tbltickets (status(10)); CREATE INDEX date ON tbltickets (date); ALTER TABLE `tblticketspamfilters` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; ALTER TABLE `tblticketspamfilters` ADD INDEX ( `type` ) ; ALTER TABLE `tbltodolist` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `admin` `admin` INT( 10 ) NOT NULL DEFAULT '0' ; CREATE INDEX duedate ON tbltodolist (duedate); ALTER TABLE `tblupgrades` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,CHANGE `orderid` `orderid` INT( 10 ) NOT NULL ; CREATE INDEX orderid ON tblupgrades (orderid); CREATE INDEX serviceid ON tblupgrades (relid); ALTER TABLE `tblwhoislog` CHANGE `id` `id` INT( 10 ) NOT NULL AUTO_INCREMENT ; INSERT INTO tblconfiguration (setting,value) VALUES ('CCRetryEveryWeekFor','0'); INSERT INTO tblconfiguration (setting,value) VALUES ('SupportTicketKBSuggestions','on'); CREATE TABLE IF NOT EXISTS `tblsslorders` ( `id` int(10) NOT NULL auto_increment, `userid` int(10) NOT NULL, `serviceid` int(10) NOT NULL, `remoteid` text COLLATE utf8_unicode_ci NOT NULL, `module` text COLLATE utf8_unicode_ci NOT NULL, `certtype` text COLLATE utf8_unicode_ci NOT NULL, `completiondate` datetime NOT NULL, `status` enum('Incomplete','Completed','Cancelled') NOT NULL, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `tblhostingaddons` CHANGE `status` `status` ENUM( 'Pending', 'Active', 'Suspended', 'Terminated', 'Cancelled', 'Fraud' ) NOT NULL DEFAULT 'Pending'; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('DailyEmailBackup', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('FTPBackupHostname', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('FTPBackupUsername', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('FTPBackupPassword', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('FTPBackupDestination', '/'); PK F'Z��p� � upgrade340.sqlnu �[��� ALTER TABLE `tbldomains` CHANGE `urlforwarding` `dnsmanagement` TEXT NOT NULL ; UPDATE `tblconfiguration` SET setting='DomainDNSManagement' WHERE setting='DomainURLForwarding' ; ALTER TABLE `tbldomainpricing` ADD `dnsmanagement` TEXT NOT NULL AFTER `renew` , ADD `emailforwarding` TEXT NOT NULL AFTER `dnsmanagement` ; INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('DomainIDProtection','5.00'); ALTER TABLE `tbldomainpricing` ADD `idprotection` TEXT NOT NULL AFTER `emailforwarding` ; ALTER TABLE `tbldomainpricing` ADD `eppcode` TEXT NOT NULL AFTER `idprotection` ; ALTER TABLE `tbldomains` ADD `idprotection` TEXT NOT NULL ; ALTER TABLE `tblclients` CHANGE `status` `status` ENUM( "Active", "Inactive" ) NOT NULL ; ALTER TABLE `tblhosting` CHANGE `domainstatus` `domainstatus` ENUM( "Pending", "Active", "Suspended", "Terminated" ) NOT NULL ; ALTER TABLE `tblhostingaddons` CHANGE `status` `status` ENUM( "Pending", "Active", "Suspended", "Terminated" ) NOT NULL ; ALTER TABLE `tbldomains` CHANGE `status` `status` ENUM( "Pending", "Active", "Expired" ) NOT NULL ; DELETE FROM tblemailtemplates WHERE type='addon'; DELETE FROM tblemailtemplates WHERE name='Domain Subscription Payment Confirmation'; DELETE FROM tblemailtemplates WHERE name='Subscription Payment Confirmation'; DELETE FROM tblemailtemplates WHERE name='Subscription Payment Due'; INSERT INTO `tblemailtemplates` (type,name,subject,message) VALUES ('domain', 'Domain Transfer Initiated', 'Domain Transfer Initiated', '<p>Dear [CustomerName], </p><p>Thank you for your domain transfer order. Your order has been received and we have now initiated the transfer process. The details of the domain purchase are below: </p><p>Domain: [Domain]<br />Registration Length: [RegPeriod]<br />Transfer Price: [FirstPaymentAmount]<br />Renewal Price: [RecurringAmount]<br />Next Due Date: [NextDueDate] </p><p>You may login to your client area at [ClientAreaLink] to manage your domain. </p><p>[Signature] </p>'); INSERT INTO `tblemailtemplates` (type,name,subject,message) VALUES ('domain', 'Domain Renewal Confirmation', 'Domain Renewal Confirmation', '<p>Dear [CustomerName], </p><p>Thank you for your domain renewal order. Your domain renewal request for the domain listed below has now been completed.</p><p>Domain: [Domain]<br />Renewal Length: [RegPeriod]<br />Renewal Price: [RecurringAmount]<br />Next Due Date: [NextDueDate] </p><p>You may login to your client area at [ClientAreaLink] to manage your domain. </p><p>[Signature] </p>'); INSERT INTO `tblemailtemplates` (type,name,subject,message) VALUES ('domain', 'Upcoming Domain Renewal Notice', 'Upcoming Domain Renewal Notice', '<p>Dear [CustomerName], </p><p>The domain name listed below will expire in [DaysUntilExpiry] days.</p><p>[Domain] - [NextDueDate]</p><p>To ensure the domain does not expire, you should renew it now. You can do this from the domains management section of our client area here: [ClientAreaLink]</p><p>Should you allow the domain to expire, you will be able to renew it for up to 30 days after the renewal date. During this time, the domain will not be accessible so any web site or email services associated with it will stop working.</p><p>[Signature]</p>'); INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('DomainRenewalNotices', '30,7,-3,0,0'); UPDATE tblpaymentgateways SET value='Invoices' WHERE gateway='paypal' AND setting='type' ; UPDATE tblpaymentgateways SET value='PayPal' WHERE gateway='paypal' AND setting='name' ; UPDATE tblhosting SET paymentmethod='paypal' WHERE paymentmethod='paypalinvoices'; UPDATE tblhostingaddons SET paymentmethod='paypal' WHERE paymentmethod='paypalinvoices'; UPDATE tbldomains SET paymentmethod='paypal' WHERE paymentmethod='paypalinvoices'; UPDATE tblinvoices SET paymentmethod='paypal' WHERE paymentmethod='paypalinvoices'; UPDATE tblaccounts SET gateway='paypal' WHERE gateway='paypalinvoices'; UPDATE tblorders SET paymentmethod='paypal' WHERE paymentmethod='paypalinvoices'; DELETE FROM tblpaymentgateways WHERE gateway='paypal' AND setting='style' ; DELETE FROM tblpaymentgateways WHERE gateway='paypalinvoices'; INSERT INTO `tblpaymentgateways` (`gateway`, `type`, `setting`, `name`, `description`) VALUES ('paypal', 'yesno', 'forcesubscriptions', 'Force Subscriptions', 'Check to hide the one time payment button when a subscription can be created'); ALTER TABLE `tbltickets` ADD `replyingadmin` INT( 1 ) NOT NULL , ADD `replyingtime` DATETIME NOT NULL ; INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('SequentialInvoiceNumbering', ''); INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('SequentialInvoiceNumberFormat', '{NUMBER}'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('SequentialInvoiceNumberValue', '1'); DELETE FROM tblconfiguration WHERE setting='InvoiceSubscriptionPayments'; ALTER TABLE `tblservers` CHANGE `primarynameserver` `nameserver1` TEXT NOT NULL ,CHANGE `primarynameserverip` `nameserver1ip` TEXT NOT NULL ,CHANGE `secondarynameserver` `nameserver2` TEXT NOT NULL ,CHANGE `secondarynameserverip` `nameserver2ip` TEXT NOT NULL ; ALTER TABLE `tblservers` ADD `nameserver3` TEXT NOT NULL AFTER `nameserver2ip` ,ADD `nameserver3ip` TEXT NOT NULL AFTER `nameserver3` ,ADD `nameserver4` TEXT NOT NULL AFTER `nameserver3ip` ,ADD `nameserver4ip` TEXT NOT NULL AFTER `nameserver4` ; INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('DefaultNameserver3', ''); INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('DefaultNameserver4', ''); ALTER TABLE `tblservers` ADD `accesshash` TEXT NOT NULL AFTER `password` ; UPDATE `tblhosting` SET nextinvoicedate = nextduedate; UPDATE `tbldomains` SET nextinvoicedate = nextduedate; UPDATE `tblhostingaddons` SET nextinvoicedate = nextduedate; PK F'Z�~� � upgrade520.sqlnu �[��� ALTER TABLE `tbladmins` ADD `disabled` INT( 1 ) NOT NULL AFTER `language`; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('AutoClientStatusChange', '2'); CREATE TABLE IF NOT EXISTS `tbltickettags` ( `id` int(10) NOT NULL AUTO_INCREMENT, `ticketid` int(10) NOT NULL, `tag` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `tbladmins` CHANGE `ticketnotifications` `ticketnotifications` TEXT NOT NULL; UPDATE tbladmins SET ticketnotifications = supportdepts WHERE ticketnotifications != ''; ALTER TABLE `tblclients` ADD `emailoptout` INT( 1 ) NOT NULL; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('AllowClientsEmailOptOut', '1'); ALTER TABLE `tblemailmarketer` ADD `marketing` INT( 1 ) NOT NULL; ALTER TABLE `tblclients` ADD `overrideautoclose` INT( 1 ) NOT NULL; UPDATE `tblemailtemplates` SET `name` = 'Automated Password Reset' WHERE `name` = 'Password Reset Confirmation'; UPDATE `tblemailtemplates` SET `message` = '<p>Dear {$client_name},</p><p>Recently a request was submitted to reset your password for our client area. If you did not request this, please ignore this email. It will expire and become useless in 2 hours time.</p><p>To reset your password, please visit the url below:<br /><a href="{$pw_reset_url}">{$pw_reset_url}</a></p><p>When you visit the link above, your password will be reset, and the new password will be emailed to you.</p><p>{$signature}</p>' WHERE `name` = 'Password Reset Validation'; INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'general', 'Password Reset Confirmation', 'Your password has been reset for {$company_name}', '<p>Dear {$client_name},</p><p>As you requested, your password for our client area has now been reset. </p><p>If it was not at your request, then please contact support immediately.</p><p>{$signature}</p>', '', '', '', '', '', '', '0'); ALTER TABLE `tblproductgroups` ADD `orderfrmtpl` TEXT NOT NULL AFTER `name`; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('BannedSubdomainPrefixes', 'mail,mx,gapps,gmail,webmail,cpanel,whm,ftp,clients,billing,members,login,accounts,access'); ALTER TABLE `tblcontacts` ADD `affiliateemails` INT( 1 ) NOT NULL AFTER `supportemails`; INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES ('1', '125'), ('1', '126'), ('2', '125'), ('2', '126'), ('3', '125'), ('3', '126'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('FreeDomainAutoRenewRequiresProduct', 'on'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('DomainToDoListEntries', 'on'); UPDATE tblemailtemplates SET message='<p>The escalation rule {$rule_name} has just been applied to this ticket.</p><p>Client: {$client_name}{if $client_id} #{$client_id}{/if} <br />Department: {$ticket_department} <br />Subject: {$ticket_subject} <br />Priority: {$ticket_priority}</p><p>---<br />{$ticket_message}<br />---</p><p>You can respond to this ticket by simply replying to this email or through the admin area at the url below.</p><p><a href="{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}">{$whmcs_admin_url}supporttickets.php?action=viewticket&id={$ticket_id}</a></p>' WHERE name='Escalation Rule Notification'; INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`, `message`) VALUES ('support', 'Support Ticket Feedback Request', 'Your Feedback is Requested for Ticket #{$ticket_id}', '<p>This support request has been marked as completed.</p><p>We would really appreciate it if you would just take a moment to let us know about the quality of your experience.</p><p><a href="{$ticket_url}&feedback=1">{$ticket_url}&feedback=1</a></p><p>Your feedback is very important to us.</p><p>Thank you for your business.</p><p>{$signature}</p>'); CREATE TABLE IF NOT EXISTS `tblticketfeedback` ( `id` int(10) NOT NULL AUTO_INCREMENT, `ticketid` int(10) NOT NULL, `adminid` int(10) NOT NULL, `rating` int(2) NOT NULL, `comments` text NOT NULL, `datetime` DATETIME NOT NULL, `ip` TEXT NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; PK F'Z���X X upgrade700alpha1.sqlnu �[��� -- remove browser.php DROP TABLE IF EXISTS `tblbrowserlinks`; DELETE FROM `tbladminperms` WHERE `permid` = 48; -- remove ClientDropdownFormat DELETE FROM `tblconfiguration` WHERE setting = 'ClientDropdownFormat'; -- feedback_request to tblticketdepartments -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblticketdepartments' and column_name='feedback_request') = 0, 'ALTER TABLE tblticketdepartments ADD `feedback_request` tinyint(1) NOT NULL DEFAULT \'0\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- set feedback request for each department based on current setting -- UPDATE `tblticketdepartments` SET `feedback_request` = CASE WHEN (SELECT value from `tblconfiguration` WHERE setting = 'TicketFeedback' LIMIT 1) = 'on' THEN 1 ELSE 0 END; -- remove TicketFeedback from tblconfiguration -- DELETE FROM `tblconfiguration` WHERE setting = 'TicketFeedback'; -- new field for tbldomainpricing set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbldomainpricing' and column_name='group') = 0, 'ALTER TABLE tbldomainpricing ADD `group` VARCHAR(5) COLLATE utf8_unicode_ci NOT NULL DEFAULT \'none\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z���9 9 upgrade440.sqlnu �[��� INSERT INTO `tbladminperms` (`roleid` ,`permid` )VALUES ('1', '97'),('1', '98'),('1', '99'),('1', '100'),('2', '98'),('2', '99'); ALTER TABLE `tblclientgroups` ADD COLUMN `separateinvoices` TEXT NOT NULL AFTER `susptermexempt`; ALTER TABLE `tblclients` ADD COLUMN `separateinvoices` TEXT NOT NULL AFTER `overideduenotices`; ALTER TABLE `tblclients` ADD COLUMN `disableautocc` TEXT NOT NULL AFTER `separateinvoices`; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('ClientDisplayFormat', '1'); ALTER TABLE `tbladmins` ADD `language` TEXT NOT NULL AFTER `template` ; ALTER TABLE `tblactivitylog` ADD `userid` INT( 10 ) NOT NULL AFTER `user` , ADD `ipaddr` TEXT NOT NULL AFTER `userid` ; ALTER TABLE `tblproducts` ADD `upgradeemail` TEXT NOT NULL AFTER `billingcycleupgrade`; UPDATE tblproducts SET upgradeemail=welcomeemail; CREATE TABLE IF NOT EXISTS `tbladdonmodules` ( `module` TEXT COLLATE utf8_unicode_ci NOT NULL , `setting` TEXT COLLATE utf8_unicode_ci NOT NULL , `value` TEXT COLLATE utf8_unicode_ci NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; PK F'ZЮ� upgrade510.sqlnu �[��� INSERT INTO tblconfiguration (setting,value) VALUES ('DomainSyncEnabled','on'); INSERT INTO tblconfiguration (setting,value) VALUES ('DomainSyncNextDueDate',''); INSERT INTO tblconfiguration (setting,value) VALUES ('DomainSyncNextDueDateDays','0'); ALTER TABLE `tbldomains` ADD `synced` INT( 1 ) NOT NULL; ALTER TABLE `tblnotes` ADD `sticky` INT( 1 ) NOT NULL; ALTER TABLE `tblproducts` CHANGE `overagesenabled` `overagesenabled` VARCHAR( 10 ) NOT NULL; ALTER TABLE `tblproducts` ADD `retired` INT( 1 ) NOT NULL; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('TicketMask', '%n%n%n%n%n%n'); ALTER TABLE `tbltickets` CHANGE `tid` `tid` VARCHAR( 15 ) NOT NULL; INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `attachments`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'admin', 'New Cancellation Request', 'New Cancellation Request', '<p>A new cancellation request has been submitted.</p><p>Client ID: {$client_id}<br>Client Name: {$clientname}<br>Service ID: {$service_id}<br>Product Name: {$product_name}<br>Cancellation Type: {$service_cancellation_type}<br>Cancellation Reason: {$service_cancellation_reason}</p><p>{$whmcs_admin_link}</p>', '', '', '', '', '', '', '', '0'); UPDATE `tblemailtemplates` SET `message` = '<p>Dear {$client_name},</p><p>This email is to confirm that we have received your cancellation request for the service listed below.</p><p>Product/Service: {$service_product_name}<br />Domain: {$service_domain}</p><p>{if $service_cancellation_type=="Immediate"}The service will be terminated within the next 24 hours.{else}The service will be cancelled at the end of your current billing period on {$service_next_due_date}.{/if}</p><p>Thank you for using {$company_name} and we hope to see you again in the future.</p><p>{$signature}</p>' WHERE `name` = 'Cancellation Request Confirmation'; INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `attachments`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'admin', 'Support Ticket Flagged', 'New Support Ticket Flagged to You', '<p>A new support ticket has been flagged to you.</p><p>Ticket #: {$ticket_tid}<br>Client Name: {$client_name} (ID {$client_id})<br>Department: {$ticket_department}<br>Subject: {$ticket_subject}<br>Priority: {$ticket_priority}</p><p>----------------------<br />{$ticket_message}<br />----------------------</p><p>{$whmcs_admin_link}</p>', '', '', '', '', '', '', '', '0'); ALTER TABLE `tbladmins` ADD `authmodule` TEXT NOT NULL AFTER `password` , ADD `authdata` TEXT NOT NULL AFTER `authmodule`; INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `attachments`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'domain', 'Domain Transfer Failed', 'Domain Transfer Failed: {$domain_name}', '<p>Dear {$client_name},</p><p>Recently you placed a domain transfer order with us but unfortunately it has failed. The reason for the failure if available is shown below so once this has been resolved, please contact us to re-attempt the transfer.</p><p>Domain: {$domain_name}<br>Failure Reason: {$domain_transfer_failure_reason}</p><p>If you have any questions, please open a support ticket from our client area @ {$whmcs_link}</p><p>{$signature}</p>', '', '', '', '', '', '', '', 0); ALTER TABLE `tbldomains` ADD `reminders` TEXT NOT NULL AFTER `donotrenew`; UPDATE `tblemailtemplates` SET `message` = '<p>Dear {$client_name},</p><p>{if $days_until_expiry}The domain(s) listed below are due to expire within the next {$days_until_expiry} days.{else}The domain(s) listed below are going to expire in {$domain_days_until_expiry} days. Renew now before it\'s too late...{/if}</p><p>{if $expiring_domains}{foreach from=$expiring_domains item=domain}{$domain.name} - {$domain.nextduedate} <strong>({$domain.days} Days)</strong><br />{/foreach}{else}{$domain_name} - {$domain_next_due_date} <strong>({$domain_days_until_nextdue} Days)</strong>{/if}</p><p>To ensure the domain does not expire, you should renew it now. You can do this from the domains management section of our client area here: {$whmcs_link}</p><p>Should you allow the domain to expire, you will be able to renew it for up to 30 days after the renewal date. During this time, the domain will not be accessible so any web site or email services associated with it will stop working.</p><p>{$signature}</p>' WHERE `name` = 'Upcoming Domain Renewal Notice'; CREATE TABLE IF NOT EXISTS `tblorderstatuses` ( `id` int(10) NOT NULL AUTO_INCREMENT, `title` text NOT NULL, `color` text NOT NULL, `showpending` int(1) NOT NULL, `showactive` int(1) NOT NULL, `showcancelled` int(1) NOT NULL, `sortorder` int(2) NOT NULL, PRIMARY KEY (`id`) ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tblorderstatuses` (`id`, `title`, `color`, `showpending`, `showactive`, `showcancelled`, `sortorder`) VALUES (1, 'Pending', '#cc0000', 1, 0, 0, 10), (2, 'Active', '#779500', 0, 1, 0, 20), (3, 'Cancelled', '#888888', 0, 0, 1, 30), (4, 'Fraud', '#000000', 0, 0, 0, 40); INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES ('1', '122'); ALTER TABLE `tblpromotions` ADD `lifetimepromo` INT(1) NOT NULL AFTER `uses`; ALTER TABLE `tblquotes` ADD `datesent` DATE NOT NULL , ADD `dateaccepted` DATE NOT NULL ; UPDATE `tblemailtemplates` SET `message` = '<p>Dear {$client_name},</p><p>Here is the quote you requested for {$quote_subject}. The quote is valid until {$quote_valid_until}. You may {if $client_id}view the quote at any time at {$quote_link} and {/if}simply reply to this email with any further questions or requirement.</p><p>{$signature}</p>' WHERE `name` = 'Quote Delivery with PDF'; INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `attachments`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'general', 'Quote Accepted', 'Quote #{$quote_number} Accepted - {$quote_subject}', '<p>\r\nDear {$client_name}, \r\n</p>\r\n<p>\r\nThis is a confirmation that quote generated on {$quote_date_created} has been accepted by you and invoice # {$invoice_num} is generated.\r\n<p>\r\n{$signature} \r\n</p>', '', '', '', '', '', '', '', '0'); INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `attachments`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'general', 'Quote Accepted Notification', 'Quote #{$quote_number} Accepted - {$quote_subject}', '<p>A quote has been accepted by the following customer.</p><p><strong>Customer Information</strong></p>\r\n<p>Customer ID: {$client_id}<br />\r\nName: {$clientname}<br />\r\nEmail: {$client_email}<br />\r\nCompany: {$client_company_name}<br />\r\nAddress 1: {$client_address1}<br />\r\nAddress 2: {$client_address2}<br />\r\nCity: {$client_city}<br />\r\nState: {$client_state}<br />\r\nPostcode: {$client_postcode}<br />\r\nCountry: {$client_country}<br />\r\nPhone Number: {$client_phonenumber}</p>\r\n<p><strong>Quote Information</strong></p>\r\n<p>Quote #: {$quote_number}<br />\r\nQuote Subject: {$quote_subject}</p><p><a href="{$whmcs_admin_url}quotes.php?action=manage&id={$quote_number}">{$whmcs_admin_url}quotes.php?action=manage&id={$quote_number}</a></p>', '', '', '', '', '', '', '', 0); PK F'Z�*!R R upgrade622release1.sqlnu �[��� INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CutUtf8Mb4', 'on'); PK F'Z2�ЃT T upgrade800rc1.sqlnu �[��� -- permission for List Users INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 152); UPDATE `tblusers` SET `last_login`=NULL WHERE `last_login`='0000-00-00 00:00:00'; UPDATE `tblusers_clients` SET `last_login`=NULL WHERE `last_login`='0000-00-00 00:00:00'; UPDATE `tblemails` SET `attachments`='[]' WHERE `attachments` IS NULL; PK F'Z�$�7� � upgrade700alpha5.sqlnu �[��� -- Add the Update WHMCS permissions to Full Admin role INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 135), (1, 136); DROP TABLE IF EXISTS `tblupdatelog`; CREATE TABLE `tblupdatelog` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `instance_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `level` int(10) unsigned NOT NULL, `message` text COLLATE utf8_unicode_ci NOT NULL, `extra` text COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; PK F'Z6�uH� � upgrade800rc2.sqlnu �[��� -- Add new field to tblhosting for qty set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblhosting' and column_name='qty') = 0, 'ALTER TABLE `tblhosting` ADD `qty` INT(10) UNSIGNED NOT NULL DEFAULT \'1\' AFTER `paymentmethod`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblhostingaddons for qty set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblhostingaddons' and column_name='qty') = 0, 'ALTER TABLE `tblhostingaddons` ADD `qty` INT(10) UNSIGNED NOT NULL DEFAULT \'1\' AFTER `name`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tbladdons for allowqty set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladdons' and column_name='allowqty') = 0, 'ALTER TABLE `tbladdons` ADD `allowqty` TINYINT(1) UNSIGNED NOT NULL DEFAULT \'0\' AFTER `billingcycle`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Zj LS S upgrade350.sqlnu �[��� DROP TABLE `tblreselleraccountsetup` ; INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('SupportModule', ''); CREATE TABLE IF NOT EXISTS `tblcontacts` (`id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,`userid` INT( 1 ) NOT NULL ,`firstname` TEXT COLLATE utf8_unicode_ci NOT NULL ,`lastname` TEXT COLLATE utf8_unicode_ci NOT NULL ,`companyname` TEXT COLLATE utf8_unicode_ci NOT NULL ,`email` TEXT COLLATE utf8_unicode_ci NOT NULL ,`address1` TEXT COLLATE utf8_unicode_ci NOT NULL ,`address2` TEXT COLLATE utf8_unicode_ci NOT NULL ,`city` TEXT COLLATE utf8_unicode_ci NOT NULL ,`state` TEXT COLLATE utf8_unicode_ci NOT NULL ,`postcode` TEXT COLLATE utf8_unicode_ci NOT NULL ,`country` TEXT COLLATE utf8_unicode_ci NOT NULL ,`phonenumber` TEXT COLLATE utf8_unicode_ci NOT NULL ,`domainemails` INT( 1 ) NOT NULL ,`generalemails` INT( 1 ) NOT NULL ,`invoiceemails` INT( 1 ) NOT NULL ,`productemails` INT( 1 ) NOT NULL ,`supportemails` INT( 1 ) NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('AddFundsEnabled', ''); INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('AddFundsMinimum', '10'); INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('AddFundsMaximum', '100'); INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('AddFundsMaximumBalance', '300'); ALTER TABLE `tbldomains` ADD `type` ENUM( 'Register', 'Transfer' ) NOT NULL AFTER `orderid` ; UPDATE `tbldomains` INNER JOIN tblorders ON tblorders.id=tbldomains.orderid SET tbldomains.type=tblorders.domaintype; ALTER TABLE `tblorders` DROP `hostingid`, DROP `domainids`, DROP `addonids`, DROP `upgradeids`, DROP `domaintype`; ALTER TABLE `tblorders` ADD `contactid` INT( 1 ) NOT NULL AFTER `userid` ; ALTER TABLE `tblticketdepartments` ADD `clientsonly` TEXT NOT NULL AFTER `email` ; DELETE FROM tblconfiguration WHERE setting='AllowTicketsRegisteredClientsOnly'; ALTER TABLE `tblclients` ADD `billingcid` INT( 1 ) NOT NULL AFTER `notes` ; INSERT INTO tblconfiguration (`setting` ,`value` )VALUES ('OrderDaysGrace', '0'); ALTER TABLE `tblinvoices` DROP `randomstring` ; PK F'Z�V� � upgrade503.sqlnu �[��� UPDATE `tblconfiguration` SET value='' WHERE setting='License'; UPDATE `tbladminroles` SET widgets = CONCAT(widgets,',supporttickets_overview'); PK F'Zi=R�| | upgrade751release1.sqlnu �[��� -- Add new EnableSafeInclude setting to tblconfiguration set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'EnableSafeInclude') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('EnableSafeInclude', '1', now(), now());",'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z���� � upgrade450.sqlnu �[��� UPDATE `tblemailtemplates` SET name='Hosting Account Welcome Email' WHERE name='Hosting Account Welcome Email (cPanel)'; UPDATE `tblemailtemplates` SET custom='1' WHERE name='Hosting Account Welcome Email (DirectAdmin)'; UPDATE `tblemailtemplates` SET custom='1' WHERE name='Hosting Account Welcome Email (Plesk)'; ALTER TABLE `tblpromotions` ADD `startdate` DATE NOT NULL AFTER `requiresexisting` ; ALTER TABLE `tblpromotions` ADD `notes` TEXT NOT NULL ; ALTER TABLE `tbladdons` ADD `suspendproduct` TEXT NOT NULL AFTER `autoactivate` ; INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES ('', 'admin', 'Escalation Rule Notification', '[Ticket ID: {$tickettid}] Escalation Rule Notification', '<p>The escalation rule {$name} has just been applied to this ticket.</p>\r\n<p>Client: {$clientname}<br />Department: {$deptname}<br />Subject: {$ticketsubject}<br />Priority: {$ticketpriority}<br />Status: {$ticketstatus}</p>\r\n<p>You can respond to this ticket by simply replying to this email or by logging into the administration area.</p>', '', '', '', '', '', '', 0); ALTER TABLE `tblcustomfields` ADD `showinvoice` TEXT NOT NULL AFTER `showorder` ; ALTER TABLE `tblproducts` ADD `autoterminatedays` INT( 4) NOT NULL AFTER `freedomaintlds` , ADD `autoterminateemail` TEXT NOT NULL AFTER `autoterminatedays` ; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('GenerateRandomUsername', ''); ALTER TABLE `tblservers` ADD `assignedips` TEXT NOT NULL AFTER `ipaddress` ; ALTER TABLE `tblquotes` ADD `proposal` TEXT NOT NULL AFTER `total` ; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('AddFundsRequireOrder', 'on'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('GroupSimilarLineItems', 'on'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('ProrataClientsAnniversaryDate', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('TCPDFFont', 'helvetica'); ALTER TABLE `tblservers` CHANGE `active` `active` INT(1) NOT NULL ; ALTER TABLE `tblservers` ADD `disabled` INT(1) NOT NULL ; ALTER TABLE `tblemailtemplates` ADD `attachments` TEXT NOT NULL AFTER `message` ; ALTER TABLE `tblpromotions` ADD `upgrades` INT(1) NOT NULL AFTER `recurfor` , ADD `upgradeconfig` TEXT NOT NULL AFTER `upgrades` ; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CancelInvoiceOnCancellation', 'on'); PK F'Z��oP� � upgrade710rc1.sqlnu �[��� -- last_capture_attempt to tblinvoices -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblinvoices' and column_name='last_capture_attempt') = 0, 'ALTER TABLE tblinvoices ADD `last_capture_attempt` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\' AFTER `datepaid`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z�*u u upgrade880rc1.sqlnu �[��� -- Add new index (date) for date column in tblinvoices set @query = if ((SELECT count(INDEX_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = database() AND TABLE_NAME = 'tblinvoices' AND INDEX_NAME = 'duedate') = 0, 'CREATE INDEX `duedate` ON `tblinvoices` (`duedate`)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add composite index for client id and client status in tblclients; set @query = if ((SELECT count(INDEX_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = database() AND TABLE_NAME = 'tblclients' AND INDEX_NAME = 'client_status_id') = 0, 'CREATE INDEX `client_status_id` ON `tblclients` (`status`, `id`)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add index for product type in tblproducts; set @query = if ((SELECT count(INDEX_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = database() AND TABLE_NAME = 'tblproducts' AND INDEX_NAME = 'type') = 0, 'CREATE INDEX `type` ON `tblproducts` (`type`(4))', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement;PK F'Z��ERz z upgrade730alpha1.sqlnu �[��� -- blind_copy_to to tblemailtemplates set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemailtemplates' and column_name='blind_copy_to') = 0, 'ALTER TABLE `tblemailtemplates` ADD `blind_copy_to` TEXT NOT NULL AFTER `copyto`', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- hidden_widgets to tbladmins set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladmins' and column_name='hidden_widgets') = 0, 'ALTER TABLE `tbladmins` ADD `hidden_widgets` TEXT COLLATE utf8_unicode_ci NOT NULL AFTER `password_reset_expiry`', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- add primary key to tbladdonmodules set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladdonmodules' and column_name='id') = 0, 'ALTER TABLE `tbladdonmodules` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- create jobs queue table CREATE TABLE IF NOT EXISTS `tbljobs_queue` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `class_name` varchar(255) NOT NULL DEFAULT '', `method_name` varchar(255) NOT NULL DEFAULT '', `input_parameters` text NOT NULL, `available_at` datetime NOT NULL, `digest_hash` varchar(255) NOT NULL DEFAULT '', `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; PK F'Z��� upgrade400.sqlnu �[��� ALTER TABLE `tblpromotions` ADD `existingclient` INT NOT NULL , ADD `onceperclient` INT NOT NULL ; ALTER TABLE `tblcredit` ADD `relid` INT( 10 ) NOT NULL DEFAULT '0' ; ALTER TABLE `tblclients` ADD `currency` INT( 10 ) NOT NULL AFTER `password` ; UPDATE tblclients SET currency=1; CREATE TABLE IF NOT EXISTS `tblcurrencies` ( `id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `code` TEXT COLLATE utf8_unicode_ci NOT NULL , `prefix` TEXT COLLATE utf8_unicode_ci NOT NULL , `suffix` TEXT COLLATE utf8_unicode_ci NOT NULL , `format` INT( 1 ) NOT NULL , `rate` DECIMAL( 10, 5 ) NOT NULL DEFAULT '1', `default` INT( 1 ) NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tblcurrencies` (`id`, `code`, `prefix`, `suffix`, `format`, `rate`, `default`) VALUES (1, 'USD', '$', ' USD', 1, 1.00000, 1); CREATE TABLE IF NOT EXISTS `tblpricing` ( `id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `type` ENUM( "product", "addon", "configoptions", "domainregister", "domaintransfer", "domainrenew", "domainaddons" ) NOT NULL , `currency` INT( 10 ) NOT NULL , `relid` INT( 10 ) NOT NULL , `msetupfee` DECIMAL( 10, 2 ) NOT NULL , `qsetupfee` DECIMAL( 10, 2 ) NOT NULL , `ssetupfee` DECIMAL( 10, 2 ) NOT NULL , `asetupfee` DECIMAL( 10, 2 ) NOT NULL , `bsetupfee` DECIMAL( 10, 2 ) NOT NULL , `monthly` DECIMAL( 10, 2 ) NOT NULL , `quarterly` DECIMAL( 10, 2 ) NOT NULL , `semiannually` DECIMAL( 10, 2 ) NOT NULL , `annually` DECIMAL( 10, 2 ) NOT NULL , `biennially` DECIMAL( 10, 2 ) NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CurrencyAutoUpdateExchangeRates', 'on'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CurrencyAutoUpdateProductPrices', ''); ALTER TABLE `tblaccounts` ADD `currency` INT( 10 ) NOT NULL AFTER `userid` ; ALTER TABLE `tblquotes` ADD `currency` INT( 10 ) NOT NULL AFTER `phonenumber` ; ALTER TABLE `tblpaymentgateways` DROP `id`, DROP `type`, DROP `name`, DROP `size`, DROP `notes`, DROP `description`; CREATE TABLE IF NOT EXISTS `tbladminsecurityquestions` ( `id` int(10) unsigned NOT NULL auto_increment, `question` text NOT NULL, PRIMARY KEY (`id`) ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `tblclients` ADD `securityqid` INT( 10 ) NOT NULL AFTER `billingcid` , ADD `securityqans` TEXT NOT NULL AFTER `securityqid` ; ALTER TABLE `tblemails` ADD `to` TEXT NULL, ADD `cc` TEXT NULL, ADD `bcc` TEXT NULL; ALTER TABLE `tbladmins` ADD `template` TEXT NOT NULL AFTER `notes` ; UPDATE tbladmins SET template='blend'; ALTER TABLE `tblaccounts` ADD `refundid` INT( 10 ) NOT NULL DEFAULT '0' ; INSERT INTO `tblconfiguration` (`setting` ,`value`) VALUES ('RequiredPWStrength', '50'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('MaintenanceMode', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('MaintenanceModeMessage', 'We are currently performing maintenance and will be back shortly.'); ALTER TABLE `tblaccounts` ADD `rate` DECIMAL( 10, 5 ) NOT NULL DEFAULT '1' AFTER `amountout` ; UPDATE tblaccounts SET rate='1'; UPDATE tblaccounts SET currency='1' WHERE userid='0'; ALTER TABLE `tblcustomfields` ADD `regexpr` TEXT NOT NULL AFTER `fieldoptions` ; CREATE TABLE IF NOT EXISTS `tblknowledgebaselinks` ( `categoryid` INT( 10 ) NOT NULL , `articleid` INT( 10 ) NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tblbillableitems` ( `id` int(10) NOT NULL auto_increment, `userid` int(10) NOT NULL, `description` text NOT NULL, `amount` decimal(10,2) NOT NULL, `recur` int(5) NOT NULL default '0', `recurcycle` text NOT NULL, `recurfor` int(5) NOT NULL default '0', `invoiceaction` int(1) NOT NULL, `duedate` date NOT NULL, `invoicecount` int(5) NOT NULL default '0', PRIMARY KEY (`id`) ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('SkipFraudForExisting', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('SMTPSSL', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('ContactFormDept', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('ContactFormTo', ''); CREATE TABLE IF NOT EXISTS `tblclientgroups` ( `id` int(10) unsigned NOT NULL auto_increment, `groupname` varchar(45) NOT NULL, `groupcolour` varchar(45) default NULL, `discountpercent` decimal(10,2) unsigned default '0.00', `susptermexempt` text COLLATE utf8_unicode_ci, PRIMARY KEY (`id`) ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `tblclients` ADD `groupid` INT( 10 ) NOT NULL AFTER `securityqans` ; CREATE TABLE IF NOT EXISTS `tblticketescalations` ( `id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` TEXT COLLATE utf8_unicode_ci NOT NULL , `departments` TEXT COLLATE utf8_unicode_ci NOT NULL , `statuses` TEXT COLLATE utf8_unicode_ci NOT NULL , `priorities` TEXT COLLATE utf8_unicode_ci NOT NULL , `timeelapsed` INT( 5 ) NOT NULL , `newdepartment` TEXT COLLATE utf8_unicode_ci NOT NULL , `newpriority` TEXT COLLATE utf8_unicode_ci NOT NULL , `newstatus` TEXT COLLATE utf8_unicode_ci NOT NULL , `flagto` TEXT COLLATE utf8_unicode_ci NOT NULL , `notify` TEXT COLLATE utf8_unicode_ci NOT NULL , `addreply` TEXT COLLATE utf8_unicode_ci NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `tblhosting` ADD `overidesuspenduntil` DATE NOT NULL AFTER `overideautosuspend` ; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('TicketEscalationLastRun', '2009-01-01 00:00:00'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('APIAllowedIPs', ''); ALTER TABLE `tblclients` ADD `gatewayid` TEXT NOT NULL AFTER `issuenumber` ; INSERT INTO `tbladminperms` (`roleid` ,`permid` )VALUES ('1', '86'),('1', '87'),('1', '88'),('1', '89'),('1', '90'),('1', '91'),('1', '92'),('1', '93'),('1', '94'); PK F'Z�V4� � upgrade730rc1.sqlnu �[��� -- Change `data` from TEXT to MEDIUMTEXT to allow storing larger datasets ALTER TABLE `tbltransientdata` MODIFY COLUMN `data` MEDIUMTEXT NOT NULL; PK F'Z���= = upgrade700rc1.sqlnu �[��� -- lastCronInvocationTime removed by backport fix in 7.0.0 GAPK F'Z�h�' ' upgrade330.sqlnu �[��� ALTER TABLE `tblproducts` ADD `order` INT( 1 ) NOT NULL ; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('LateFeeType', 'Percentage'); CREATE TABLE IF NOT EXISTS `tblnotes` ( `id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `userid` INT( 10 ) UNSIGNED ZEROFILL NOT NULL , `adminid` INT( 1 ) NOT NULL , `created` DATETIME NOT NULL , `modified` DATETIME NOT NULL , `note` TEXT COLLATE utf8_unicode_ci NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `tblproductconfigoptionssub` ADD `setup` DECIMAL( 10, 2 ) NOT NULL AFTER `optionname` ; ALTER TABLE `tblemailtemplates` ADD `copyto` TEXT NOT NULL ; ALTER TABLE `tblemailtemplates` ADD `plaintext` INT( 1 ) NOT NULL ; ALTER TABLE `tblinvoices` ADD `invoicenum` TEXT NOT NULL AFTER `id` ; ALTER TABLE `tbldownloads` ADD `productdownload` TEXT NOT NULL ; ALTER TABLE `tblproducts` ADD `downloads` TEXT NOT NULL AFTER `affiliatepayamount` ; UPDATE tblconfiguration SET setting='SendFirstOverdueInvoiceReminder' WHERE setting='SendOverdueInvoiceReminders'; INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('SendSecondOverdueInvoiceReminder', '0'); INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('SendThirdOverdueInvoiceReminder', '0'); UPDATE tblemailtemplates SET name='First Invoice Overdue Notice' WHERE name='Invoice Overdue Notice'; UPDATE tblemailtemplates SET subject='First Invoice Overdue Notice' WHERE subject='Invoice Overdue Notice'; INSERT INTO `tblemailtemplates` (type,name,subject,message) VALUES ( 'invoice', 'Second Invoice Overdue Notice', 'Second Invoice Overdue Notice', '<p> Dear [CustomerName], </p> <p> This is the second billing notice that your invoice no. [InvoiceNo] which was generated on [InvoiceDate] is now overdue. </p> <p> Your payment method is: [PaymentMethod] </p> <p> Invoice: [InvoiceNo]<br /> Balance Due: [Balance]<br /> Due Date: [DueDate] </p> <p> You can login to your client area to view and pay the invoice at [InvoiceLink] </p> <p> Your login details are as follows: </p> <p> Email Address: [CustomerEmail]<br /> Password: [CAPassword] </p> <p> [Signature] </p>'); INSERT INTO `tblemailtemplates` (type,name,subject,message) VALUES ( 'invoice', 'Third Invoice Overdue Notice', 'Third Invoice Overdue Notice', '<p> Dear [CustomerName], </p> <p> This is the third and final billing notice that your invoice no. [InvoiceNo] which was generated on [InvoiceDate] is now overdue. Failure to make payment will result in account suspension.</p> <p> Your payment method is: [PaymentMethod] </p> <p> Invoice: [InvoiceNo]<br /> Balance Due: [Balance]<br /> Due Date: [DueDate] </p> <p> You can login to your client area to view and pay the invoice at [InvoiceLink] </p> <p> Your login details are as follows: </p> <p> Email Address: [CustomerEmail]<br /> Password: [CAPassword] </p> <p> [Signature] </p>'); PK F'Z�*�4� � upgrade832release1.sqlnu �[��� -- Remove orphaned affiliate data DELETE FROM tblaffiliatespending WHERE `affaccid` IN (SELECT acc.id FROM tblaffiliatesaccounts acc LEFT JOIN tblaffiliates aff ON aff.id = acc.affiliateid WHERE aff.id IS NULL); DELETE FROM tblaffiliates_hits WHERE `affiliate_id` NOT IN (SELECT id FROM tblaffiliates); DELETE FROM tblaffiliates_referrers WHERE `affiliate_id` NOT IN (SELECT id FROM tblaffiliates); DELETE FROM tblaffiliatesaccounts WHERE `affiliateid` NOT IN (SELECT id FROM tblaffiliates); DELETE FROM tblaffiliateshistory WHERE `affiliateid` NOT IN (SELECT id FROM tblaffiliates); DELETE FROM tblaffiliateswithdrawals WHERE `affiliateid` NOT IN (SELECT id FROM tblaffiliates);PK F'Z8��T T upgrade442.sqlnu �[��� INSERT INTO `tblconfiguration` (setting,value) VALUES ('CCDoNotRemoveOnExpiry',''); PK F'Z��K� � upgrade452.sqlnu �[��� ALTER TABLE `tblsslorders` CHANGE `status` `status` TEXT NOT NULL; UPDATE `tblsslorders` SET status='Awaiting Configuration' WHERE status='Incomplete'; ALTER TABLE `tblsslorders` ADD `configdata` TEXT NOT NULL AFTER `certtype`; PK F'Z��͌� � upgrade538release1.sqlnu �[��� UPDATE tblemailtemplates SET subject = 'Credit Card Payment Due' WHERE name = 'Credit Card Payment Due' AND subject = 'Invoice Payment Reminder'; PK F'Zv�Ȟ � upgrade831release1.sqlnu �[��� -- Add new index (date) for date column in tblticketmaillog set @query = if ((SELECT count(INDEX_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = database() AND TABLE_NAME = 'tblticketmaillog' AND INDEX_NAME = 'date') = 0, 'ALTER TABLE `tblticketmaillog` ADD INDEX `date` (`date`)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Remove orphaned affiliate data DELETE FROM tblaffiliatespending WHERE `affaccid` IN (SELECT acc.id FROM tblaffiliatesaccounts acc LEFT JOIN tblaffiliates aff ON aff.id = acc.affiliateid WHERE aff.id IS NULL); DELETE FROM tblaffiliates_hits WHERE `affiliate_id` NOT IN (SELECT id FROM tblaffiliates); DELETE FROM tblaffiliates_referrers WHERE `affiliate_id` NOT IN (SELECT id FROM tblaffiliates); DELETE FROM tblaffiliatesaccounts WHERE `affiliateid` NOT IN (SELECT id FROM tblaffiliates); DELETE FROM tblaffiliateshistory WHERE `affiliateid` NOT IN (SELECT id FROM tblaffiliates); DELETE FROM tblaffiliateswithdrawals WHERE `affiliateid` NOT IN (SELECT id FROM tblaffiliates); -- Remove unnecessary tracking column from tblproducts_slugs set @query = if ((select count(*) from information_schema.columns where TABLE_NAME='tblproducts_slugs' and COLUMN_NAME='tracking' and TABLE_SCHEMA=database()) > 0, 'ALTER TABLE `tblproducts_slugs` DROP COLUMN `tracking`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement;PK F'ZE�� � upgrade7101release1.sqlnu �[��� -- Add new field to tblhosting for promocount set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblhosting' and column_name='promocount') = 0, 'alter table `tblhosting` add `promocount` INT(10) NULL DEFAULT \'0\' AFTER `promoid`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Update promocount for existing services and set to null UPDATE `tblhosting` SET `promocount` = null;PK F'Z��#�� � upgrade710beta1.sqlnu �[��� -- Remove table structure for table `tbltask_schedule` DROP TABLE IF EXISTS `tbltask_schedule`; -- Remove table structure for table `tbltask_mutex` DROP TABLE IF EXISTS `tbltask_mutex`; -- Remove table structure for table `tbllog_task` DROP TABLE IF EXISTS `tbllog_task`; -- Table structure for table `tbltask` DROP TABLE IF EXISTS `tbltask`; CREATE TABLE `tbltask` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `priority` int(11) NOT NULL DEFAULT '0', `class_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `is_enabled` tinyint(4) NOT NULL DEFAULT '1', `is_periodic` tinyint(4) NOT NULL DEFAULT '1', `frequency` int(10) unsigned NOT NULL DEFAULT '0', `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `description` text COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; LOCK TABLES `tbltask` WRITE; INSERT INTO `tbltask` (`id`,`priority`,`class_name`,`is_enabled`,`is_periodic`,`frequency`,`name`,`description`,`created_at`,`updated_at`) VALUES (1,1530,'WHMCS\\Cron\\Task\\AddLateFees',1,1,1440,'Late Fees','Apply Late Fees','2016-11-02 16:59:20','2016-11-02 16:59:20'),(2,1620,'WHMCS\\Cron\\Task\\AffiliateCommissions',1,1,1440,'Delayed Affiliate Commissions','Process Delayed Affiliate Commissions','2016-11-02 16:59:20','2016-11-02 16:59:20'),(3,1630,'WHMCS\\Cron\\Task\\AffiliateReports',1,1,43200,'Affiliate Reports','Send Monthly Affiliate Reports','2016-11-02 16:59:20','2016-11-02 16:59:20'),(4,1680,'WHMCS\\Cron\\Task\\AutoClientStatusSync',1,1,1440,'Client Status Update','Synchronise Client Status','2016-11-02 16:59:20','2016-11-02 16:59:20'),(5,1590,'WHMCS\\Cron\\Task\\AutoTerminations',1,1,1440,'Overdue Terminations','Process Overdue Terminations','2016-11-02 16:59:20','2016-11-02 16:59:20'),(6,1570,'WHMCS\\Cron\\Task\\CancellationRequests',1,1,1440,'Cancellation Requests','Process Cancellation Requests','2016-11-02 16:59:20','2016-11-02 16:59:20'),(7,2000,'WHMCS\\Cron\\Task\\CheckForWhmcsUpdate',1,1,480,'WHMCS Updates','Check for WHMCS Software Updates','2016-11-02 16:59:20','2016-11-02 16:59:20'),(8,1610,'WHMCS\\Cron\\Task\\CloseInactiveTickets',1,1,1440,'Inactive Tickets','Auto Close Inactive Tickets','2016-11-02 16:59:20','2016-11-02 16:59:20'),(9,1520,'WHMCS\\Cron\\Task\\CreateInvoices',1,1,1440,'Invoices','Generate Invoices','2016-11-02 16:59:20','2016-11-02 16:59:20'),(10,1650,'WHMCS\\Cron\\Task\\CreditCardExpiryNotices',1,1,43200,'Credit Card Expiry Notices','Sending Credit Card Expiry Reminders','2016-11-02 16:59:20','2016-11-02 16:59:20'),(11,1500,'WHMCS\\Cron\\Task\\CurrencyUpdateExchangeRates',1,1,1440,'Currency Exchange Rates','Update Currency Exchange Rates','2016-11-02 16:59:20','2016-11-02 16:59:20'),(12,1510,'WHMCS\\Cron\\Task\\CurrencyUpdateProductPricing',1,1,1440,'Product Pricing Updates','Update Product Prices for Current Rates','2016-11-02 16:59:20','2016-11-02 16:59:20'),(13,1560,'WHMCS\\Cron\\Task\\DomainRenewalNotices',1,1,1440,'Domain Renewal Notices','Processing Domain Renewal Notices','2016-11-02 16:59:20','2016-11-02 16:59:20'),(14,1640,'WHMCS\\Cron\\Task\\EmailMarketer',1,1,1440,'Email Marketer Rules','Process Email Marketer Rules','2016-11-02 16:59:20','2016-11-02 16:59:20'),(15,1600,'WHMCS\\Cron\\Task\\FixedTermTerminations',1,1,1440,'Fixed Term Terminations','Process Fixed Term Terminations','2016-11-02 16:59:20','2016-11-02 16:59:20'),(16,1550,'WHMCS\\Cron\\Task\\InvoiceReminders',1,1,1440,'Invoice & Overdue Reminders','Generate daily reminders for unpaid and overdue invoice','2016-11-02 16:59:20','2016-11-02 16:59:20'),(17,1670,'WHMCS\\Cron\\Task\\OverageBilling',1,1,43200,'Overage Billing Charges','Process Overage Billing Charges','2016-11-02 16:59:20','2016-11-02 16:59:20'),(18,1540,'WHMCS\\Cron\\Task\\ProcessCreditCardPayments',1,1,1440,'Credit Card Charges','Process Credit Card Charges','2016-11-02 16:59:20','2016-11-02 16:59:20'),(19,1580,'WHMCS\\Cron\\Task\\AutoSuspensions',1,1,1440,'Overdue Suspensions','Process Overdue Suspensions','2016-11-02 16:59:21','2016-11-02 16:59:21'),(20,1700,'WHMCS\\Cron\\Task\\TicketEscalations',1,1,3,'Ticket Escalation Rules','Process and escalate tickets per any Escalation Rules','2016-11-02 16:59:21','2016-11-02 16:59:21'),(21,1690,'WHMCS\\Cron\\Task\\UpdateDomainExpiryStatus',1,1,1440,'Domain Expiry','Update Domain Expiry Status','2016-11-02 16:59:21','2016-11-02 16:59:21'),(22,1660,'WHMCS\\Cron\\Task\\UpdateServerUsage',1,1,1440,'Server Usage Stats','Updating Disk & Bandwidth Usage Stats','2016-11-02 16:59:21','2016-11-02 16:59:21'); UNLOCK TABLES; -- Table structure for table `tbltask_status` DROP TABLE IF EXISTS `tbltask_status`; CREATE TABLE `tbltask_status` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `task_id` int(10) unsigned NOT NULL, `in_progress` tinyint(4) NOT NULL DEFAULT '0', `last_run` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `next_due` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; LOCK TABLES `tbltask_status` WRITE; INSERT INTO `tbltask_status` (`id`,`task_id`,`in_progress`,`last_run`,`next_due`,`created_at`,`updated_at`) VALUES (1,1,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(2,2,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(3,3,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(4,4,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(5,5,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(6,6,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(7,7,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(8,8,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(9,9,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(10,10,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(11,11,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(12,12,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(13,13,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(14,14,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(15,15,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(16,16,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(17,17,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(18,18,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:20','2016-11-02 16:59:23'),(19,19,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:21','2016-11-02 16:59:23'),(20,20,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:21','2016-11-02 16:59:23'),(21,21,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:21','2016-11-02 16:59:23'),(22,22,0,'0000-00-00 00:00:00','2016-11-02 16:59:23','2016-11-02 16:59:21','2016-11-02 16:59:23'); UNLOCK TABLES; -- Table structure for table `tbllog_register` DROP TABLE IF EXISTS `tbllog_register`; CREATE TABLE `tbllog_register` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `namespace_id` int(10) unsigned, `namespace` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `namespace_value` text COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Insert Automation Status Permission to admin role 1 INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 138); PK F'Z�W^� � upgrade410.sqlnu �[��� ALTER TABLE `tblticketdepartments` ADD `piperepliesonly` TEXT NOT NULL AFTER `clientsonly` ; CREATE TABLE IF NOT EXISTS `tblservergroups` ( `id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` TEXT COLLATE utf8_unicode_ci NOT NULL , `filltype` INT( 1 ) NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tblservergroupsrel` ( `groupid` INT( 10 ) NOT NULL , `serverid` INT( 10 ) NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `tblproducts` DROP `defaultserver` ; ALTER TABLE `tblproducts` ADD `servergroup` INT( 10 ) NOT NULL AFTER `servertype` ; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('DisableSessionIPCheck', ''); ALTER TABLE `tblclients` ADD `cardlastfour` TEXT NOT NULL AFTER `cardtype` ; ALTER TABLE `tbladdons` ADD `downloads` TEXT NOT NULL , ADD `autoactivate` TEXT NOT NULL , ADD `welcomeemail` INT( 10 ) NOT NULL ; ALTER TABLE `tblhostingaddons` ADD `addonid` INT( 10 ) NOT NULL AFTER `hostingid` ; ALTER TABLE `tblproductconfigoptions` ADD `hidden` INT( 1 ) NOT NULL ; ALTER TABLE `tblproductconfigoptionssub` ADD `hidden` INT( 1 ) NOT NULL ; ALTER TABLE `tbltickets` ADD `cc` TEXT NOT NULL AFTER `email` ; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('DisableSupportTicketReplyEmailsLogging', ''); CREATE TABLE IF NOT EXISTS `tblclientsfiles` ( `id` INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `userid` INT( 10 ) NOT NULL , `title` TEXT COLLATE utf8_unicode_ci NOT NULL , `filename` TEXT COLLATE utf8_unicode_ci NOT NULL , `adminonly` INT( 1 ) NOT NULL , `dateadded` DATE NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `tblclients` ADD `pwresetkey` TEXT NOT NULL , ADD `pwresetexpiry` INT( 10 ) NOT NULL ; INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'general', 'Password Reset Validation', 'Your login details for {$company_name}', '<p>Dear {$client_name},</p><p>Recently a request was submitted to reset your password for our client area. If you did not request this, please ignore this email. It will expire and become useless in 2 hours time.</p><p>To reset your password, please visit the url below:<br /><a href="{$pw_reset_url}">{$pw_reset_url}</a></p><p>When you visit the link above, your password will be reset, and the new password will be emailed to you.</p><p>{$signature}</p>', '', '', '', '', '', '', '0'); INSERT INTO `tblemailtemplates` (`id`, `type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES (NULL, 'general', 'Password Reset Confirmation', 'Your new password for {$company_name}', '<p>Dear {$client_name},</p><p>As you requested, your password for our client area has now been reset. Your new login details are as follows:</p><p>{$whmcs_link}<br />Email: {$client_email}<br />Password: {$client_password}</p><p>To change your password to something more memorable, after logging in go to My Details > Change Password.</p><p>{$signature}</p>', '', '', '', '', '', '', '0'); ALTER TABLE `tblproducts` ADD `overagesenabled` INT( 1 ) NOT NULL AFTER `billingcycleupgrade` , ADD `overagesdisklimit` INT( 10 ) NOT NULL AFTER `overagesenabled` , ADD `overagesbwlimit` INT( 10 ) NOT NULL AFTER `overagesdisklimit` , ADD `overagesdiskprice` DECIMAL( 6, 4 ) NOT NULL AFTER `overagesbwlimit` , ADD `overagesbwprice` DECIMAL( 6, 4 ) NOT NULL AFTER `overagesdiskprice` ; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('OverageBillingMethod', '1'); ALTER TABLE `tblproductconfigoptions` ADD `qtyminimum` INT( 10 ) NOT NULL AFTER `optiontype` , ADD `qtymaximum` INT( 10 ) NOT NULL AFTER `qtyminimum` ; ALTER TABLE `tblcustomfields` ADD `description` TEXT NOT NULL AFTER `fieldtype` ; INSERT INTO `tblconfiguration` (`setting` ,`value`)VALUES ('CCNeverStore', ''); INSERT INTO `tblconfiguration` (`setting` ,`value`)VALUES ('CCAllowCustomerDelete', ''); PK F'Z���6 , , upgrade620alpha1.sqlnu �[��� -- Add the Configure Application Links permission to Full Admin role INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 133); -- Add the Configure OpenID Connect permission to Full Admin role INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 134); -- Remove the Disable Client Dropdown setting DELETE FROM `tblconfiguration` WHERE `setting` = 'DisableClientDropdown'; -- Add termination_date to tblhosting ALTER TABLE `tblhosting` ADD `termination_date` DATE NOT NULL DEFAULT '0000-00-00' AFTER `nextinvoicedate`; -- Add termination_date to tblhostingaddons ALTER TABLE `tblhostingaddons` ADD `termination_date` DATE NOT NULL DEFAULT '0000-00-00' AFTER `nextinvoicedate`; -- Populate the termination date for tblhosting and tblhostingaddons for terminated products UPDATE `tblhosting` SET `termination_date` = `nextduedate` WHERE `domainstatus` = 'Terminated' OR `domainstatus` = 'Cancelled'; UPDATE `tblhostingaddons` SET `termination_date` = `nextduedate` WHERE `status` = 'Terminated' OR `status` = 'Cancelled'; -- Add single sign-on client toggle setting ALTER TABLE `tblclients` ADD `allow_sso` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `overrideautoclose` ; -- \WHMCS\ApplicationLink\AccessToken CREATE TABLE IF NOT EXISTS `tbloauthserver_access_tokens` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `access_token` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `client_id` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `user_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `redirect_uri` varchar(2000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `expires` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `tbloauthserver_access_tokens_access_token_unique` (`access_token`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tbloauthserver_access_token_scopes` ( `access_token_id` int(10) unsigned NOT NULL DEFAULT '0', `scope_id` int(10) unsigned NOT NULL DEFAULT '0', KEY `tbloauthserver_access_token_scopes_scope_id_index` (`access_token_id`,`scope_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- \WHMCS\ApplicationLink\ApplicationLink CREATE TABLE IF NOT EXISTS `tblapplinks` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `module_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `module_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `is_enabled` tinyint(4) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- \WHMCS\ApplicationLink\AuthorizationCode CREATE TABLE IF NOT EXISTS `tbloauthserver_auth_codes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `authorization_code` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `client_id` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `user_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `redirect_uri` varchar(2000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `id_token` varchar(2000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `expires` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `tbloauthserver_auth_codes_authorization_code_unique` (`authorization_code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tbloauthserver_authcode_scopes` ( `authorization_code_id` int(10) unsigned NOT NULL DEFAULT '0', `scope_id` int(10) unsigned NOT NULL DEFAULT '0', KEY `tbloauthserver_authcode_scopes_scope_id_index` (`authorization_code_id`,`scope_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- \WHMCS\ApplicationLink\Client CREATE TABLE IF NOT EXISTS `tbloauthserver_clients` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `identifier` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `secret` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `redirect_uri` varchar(2000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `grant_types` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `user_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `service_id` int(11) NOT NULL DEFAULT '0', `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `logo_uri` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `rsa_key_pair_id` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `tbloauthserver_clients_identifier_unique` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tbloauthserver_client_scopes` ( `client_id` int(10) unsigned NOT NULL DEFAULT '0', `scope_id` int(10) unsigned NOT NULL DEFAULT '0', KEY `tbloauthserver_client_scopes_scope_id_index` (`client_id`,`scope_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- \WHMCS\ApplicationLink\Links CREATE TABLE IF NOT EXISTS `tblapplinks_links` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `applink_id` int(10) unsigned NOT NULL DEFAULT '0', `scope` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `display_label` varchar(256) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `is_enabled` tinyint(4) NOT NULL DEFAULT '0', `order` tinyint(4) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- \WHMCS\ApplicationLink\Log CREATE TABLE IF NOT EXISTS `tblapplinks_log` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `applink_id` int(10) unsigned NOT NULL DEFAULT '0', `message` varchar(2000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `level` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- \WHMCS\ApplicationLink\Scope CREATE TABLE IF NOT EXISTS `tbloauthserver_scopes` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `scope` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `is_default` tinyint(4) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `tbloauthserver_scopes_scope_unique` (`scope`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tbloauthserver_scopes` (`id`,`scope`,`description`,`is_default`,`created_at`,`updated_at`) VALUES (1, 'clientarea:sso', 'Single Sign-on for Client Area', 1, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (2, 'clientarea:profile', 'Account Profile', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (3, 'clientarea:billing_info', 'Manage Billing Information', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (4, 'clientarea:emails', 'Email History', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (5, 'clientarea:announcements', 'Announcements', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (6, 'clientarea:downloads', 'Downloads', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (7, 'clientarea:knowledgebase', 'Knowledgebase', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (8, 'clientarea:network_status', 'Network Status', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (9, 'clientarea:services', 'Products/Services', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (10, 'clientarea:product_details', 'Product Info/Details (requires associated serviceId)', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (11, 'clientarea:domains', 'Domains', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (12, 'clientarea:domain_details', 'Domain Info/Details (requires associated domainId)', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (13, 'clientarea:invoices', 'Invoices', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (14, 'clientarea:tickets', 'Support Tickets', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (15, 'clientarea:submit_ticket', 'Submit New Ticket', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (16, 'clientarea:shopping_cart', 'Shopping Cart Default Product Group', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (17, 'clientarea:shopping_cart_addons', 'Shopping Cart Product Addons', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (18, 'clientarea:shopping_cart_domain_register', 'Shopping Cart Register New Domain', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (19, 'clientarea:shopping_cart_domain_transfer', 'Shopping Cart Transfer Existing Domain', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (20, 'openid', 'Scope required for OpenID Connect ID tokens', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (21, 'email', 'Scope used for Email Claim', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'), (22, 'profile', 'Scope used for Profile Claim', 0, '0000-00-00 00:00:00','0000-00-00 00:00:00'); -- \WHMCS\ApplicationLink\Scope\UserAuthorization CREATE TABLE IF NOT EXISTS `tbloauthserver_user_authz` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `client_id` int(10) unsigned NOT NULL DEFAULT '0', `expires` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tbloauthserver_user_authz_scopes` ( `user_authz_id` int(10) unsigned NOT NULL DEFAULT '0', `scope_id` int(10) unsigned NOT NULL DEFAULT '0', KEY `tbloauthserver_user_authz_scopes_scope_id_index` (`user_authz_id`,`scope_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- \WHMCS\Security\Encryption\RsaKeyPair CREATE TABLE IF NOT EXISTS `tblrsakeypairs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `identifier` varchar(96) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `private_key` text COLLATE utf8_unicode_ci NOT NULL, `public_key` text COLLATE utf8_unicode_ci NOT NULL, `algorithm` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'RS256', `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; PK F'Z�cEN� � upgrade860rc1.sqlnu �[��� -- 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; PK F'Z���� upgrade783release1.sqlnu �[��� UPDATE `tblclients` SET `state`='ARABA/ÁLAVA' WHERE `state`='ARABA'; UPDATE `tblcontacts` SET `state`='ARABA/ÁLAVA' WHERE `state`='ARABA'; UPDATE `tblquotes` SET `state`='ARABA/ÁLAVA' WHERE `state`='ARABA'; UPDATE `tbltax` SET `state`='ARABA/ÁLAVA' WHERE `state`='ARABA'; PK F'Z�gdL� � upgrade720alpha1.sqlnu �[��� CREATE TABLE IF NOT EXISTS `tblapilog` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `action` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `request` text COLLATE utf8_unicode_ci NOT NULL, `response` text COLLATE utf8_unicode_ci NOT NULL, `status` int(11) NOT NULL DEFAULT '0', `headers` text COLLATE utf8_unicode_ci NOT NULL, `level` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- add What's New permission INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 139); -- add Manage API Credentials permission INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 142); CREATE TABLE IF NOT EXISTS `tbldeviceauth` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `identifier` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `secret` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `user_id` int(11) NOT NULL DEFAULT '0', `is_admin` tinyint(1) NOT NULL DEFAULT '0', `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `last_access` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `tbldeviceauth_identifier_unique` (`identifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tblmarketconnect_services` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(30) NOT NULL DEFAULT '', `status` tinyint(1) NOT NULL DEFAULT '0', `product_ids` text NOT NULL, `settings` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- created_at to tbladdons -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladdons' and column_name='created_at') = 0, 'ALTER TABLE `tbladdons` ADD COLUMN `created_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\';', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- updated_at to tbladdons -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladdons' and column_name='updated_at') = 0, 'ALTER TABLE `tbladdons` ADD COLUMN `updated_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\';', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- type to tbladdons -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladdons' and column_name='type') = 0, 'ALTER TABLE tbladdons ADD `type` VARCHAR(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT \'\' AFTER `welcomeemail`;', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- module to tbladdons -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladdons' and column_name='module') = 0, 'ALTER TABLE tbladdons ADD `module` VARCHAR(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT \'\' AFTER `type`;', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- server_group_id to tbladdons -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladdons' and column_name='server_group_id') = 0, 'ALTER TABLE tbladdons ADD `server_group_id` INTEGER(10) NOT NULL DEFAULT \'0\' AFTER `module`;', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- server to tblhostingaddons -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblhostingaddons' and column_name='server') = 0, 'ALTER TABLE tblhostingaddons ADD `server` INTEGER(10) NOT NULL DEFAULT \'0\' AFTER `addonid`;', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- userid to tblhostingaddons -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblhostingaddons' and column_name='userid') = 0, 'ALTER TABLE tblhostingaddons ADD `userid` INTEGER(10) NOT NULL DEFAULT \'0\' AFTER `addonid`;', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- Create tblmodule_configuration CREATE TABLE IF NOT EXISTS `tblmodule_configuration` ( `id` INTEGER(10) unsigned NOT NULL AUTO_INCREMENT, `entity_type` VARCHAR(8) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `entity_id` INTEGER(10) unsigned NOT NULL DEFAULT '0', `setting_name` VARCHAR(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `friendly_name` VARCHAR(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `value` text COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), UNIQUE KEY `unique_constraint` (`entity_type`,`entity_id`,`setting_name`), KEY `tblmodule_configuration_entity_type_index` (`entity_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Convert autoactivate on tbladdons -- UPDATE `tbladdons` SET `autoactivate` = 'payment' WHERE `autoactivate` = 'on'; -- id to tblcustomfieldsvalues -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblcustomfieldsvalues' and column_name='id') = 0, 'ALTER TABLE `tblcustomfieldsvalues` ADD COLUMN `id` INT(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT NOT NULL FIRST;', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- created_at to tblcustomfieldsvalues -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblcustomfieldsvalues' and column_name='created_at') = 0, 'ALTER TABLE `tblcustomfieldsvalues` ADD COLUMN `created_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\';', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- updated_at to tblcustomfieldsvalues -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblcustomfieldsvalues' and column_name='updated_at') = 0, 'ALTER TABLE `tblcustomfieldsvalues` ADD COLUMN `updated_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\';', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- addon_id to tblsslorders -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblsslorders' and column_name='addon_id') = 0, 'ALTER TABLE `tblsslorders` ADD COLUMN `addon_id` INT(10) NOT NULL DEFAULT \'0\' AFTER `serviceid`;', 'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- add default value to completiondate on tblsslorders -- ALTER TABLE `tblsslorders` MODIFY COLUMN `completiondate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'; -- reports to tbladminroles -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbladminroles' and column_name='reports') = 0, 'ALTER TABLE tbladminroles ADD `reports` text NOT NULL AFTER `widgets`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z����� � upgrade630rc1.sqlnu �[��� -- editor to tbltickets -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbltickets' and column_name='editor') = 0, 'ALTER TABLE tbltickets ADD `editor` enum(\'plain\',\'markdown\') COLLATE utf8_unicode_ci NOT NULL DEFAULT \'plain\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- editor to tblticketreplies -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblticketreplies' and column_name='editor') = 0, 'ALTER TABLE tblticketreplies ADD `editor` enum(\'plain\',\'markdown\') COLLATE utf8_unicode_ci NOT NULL DEFAULT \'plain\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- editor to tblticketnotes -- set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblticketnotes' and column_name='editor') = 0, 'ALTER TABLE tblticketnotes ADD `editor` enum(\'plain\',\'markdown\') COLLATE utf8_unicode_ci NOT NULL DEFAULT \'plain\'', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z⩐m m upgrade360.sqlnu �[��� CREATE TABLE IF NOT EXISTS `tbladminroles` ( `id` int(1) NOT NULL auto_increment, `name` text COLLATE utf8_unicode_ci NOT NULL, `systememails` int(1) NOT NULL, `accountemails` int(1) NOT NULL, `supportemails` int(1) NOT NULL, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tbladminroles` (`id`, `name`, `systememails`, `accountemails`, `supportemails`) VALUES(1, 'Full Administrator', 1, 1, 1); INSERT INTO `tbladminroles` (`id`, `name`, `systememails`, `accountemails`, `supportemails`) VALUES(2, 'Sales Operator', 0, 1, 1); INSERT INTO `tbladminroles` (`id`, `name`, `systememails`, `accountemails`, `supportemails`) VALUES(3, 'Support Operator', 0, 0, 1); CREATE TABLE IF NOT EXISTS `tbladminperms` ( `roleid` int(1) NOT NULL, `permid` int(1) NOT NULL) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES(1, 1),(1, 2),(1, 3),(1, 4),(1, 5),(1, 6),(1, 7),(1, 8),(1, 9),(1, 10),(1, 11),(1, 12),(1, 13),(1, 14),(1, 15),(1, 16),(1, 17),(1, 18),(1, 19),(1, 20),(1, 21),(1, 22),(1, 23),(1, 24),(1, 25),(1, 26),(1, 27),(1, 28),(1, 29),(1, 30),(1, 31),(1, 32),(1, 33),(1, 34),(1, 35),(1, 36),(1, 37),(1, 38),(1, 39),(1, 40),(1, 41),(1, 42),(1, 43),(1, 44),(1, 45),(1, 46),(1, 47),(1, 48),(1, 49),(1, 50),(1, 51),(1, 52),(1, 53),(1, 54),(1, 55),(1, 56),(1, 57),(1, 58),(1, 59),(1, 60),(1, 61),(1, 62),(1, 63),(1, 64),(1, 65),(1, 66),(1, 67),(1, 68),(1, 69),(1, 70),(1, 71),(1, 72),(1, 73),(1, 74),(1, 75),(1, 76),(1, 77),(1, 78),(1, 79),(1, 80),(1, 81),(1, 82),(1, 83),(2, 1),(2, 2),(2, 3),(2, 4),(2, 5),(2, 6),(2, 7),(2, 8),(2, 9),(2, 10),(2, 11),(2, 12),(2, 13),(2, 14),(2, 15),(2, 16),(2, 17),(2, 18),(2, 19),(2, 20),(2, 21),(2, 22),(2, 23),(2, 24),(2, 25),(2, 26),(2, 27),(2, 28),(2, 29),(2, 30),(2, 31),(2, 32),(2, 33),(2, 34),(2, 35),(2, 36),(2, 37),(2, 38),(2, 39),(2, 40),(2, 41),(2, 42),(2, 43),(2, 44),(2, 45),(2, 46),(2, 47),(2, 48),(2, 49),(2, 50),(2, 51),(2, 52),(3, 3),(3, 38),(3, 39),(3, 40),(3, 41),(3, 42),(3, 43),(3, 44),(3, 50); ALTER TABLE `tbladmins` ADD `roleid` INT( 1 ) NOT NULL AFTER `id` ; ALTER TABLE `tblticketdepartments` ADD `noautoresponder` TEXT NOT NULL AFTER `clientsonly` ; UPDATE `tblconfiguration` SET `setting`='CaptchaSetting' WHERE `setting`='DisableCapatcha'; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('DisableClientDropdown', ''); INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`, `message`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES('general', 'Credit Card Expiring Soon', 'Credit Card Expiring Soon', '<p>Dear [CustomerName], </p><p>This is a notice to inform you that your [CCType] credit card ending with [CCLastFour] will be expiring next month on [CCExpiryDate]. Please login to update your credit card information as soon as possible and prevent any interuptions in service at [ClientAreaLink]<br /><br />If you have any questions regarding your account, please open a support ticket from the client area.</p><p>[Signature]</p>', '', '', '', '', '', '', 0); CREATE TABLE IF NOT EXISTS `tbllinks` (`id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,`name` TEXT COLLATE utf8_unicode_ci NOT NULL ,`link` TEXT COLLATE utf8_unicode_ci NOT NULL ,`clicks` INT( 1 ) NOT NULL ,`conversions` INT( 1 ) NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; UPDATE tbladmins SET roleid='1' WHERE userlevel='3'; UPDATE tbladmins SET roleid='2' WHERE userlevel='2'; UPDATE tbladmins SET roleid='3' WHERE userlevel='1'; ALTER TABLE `tbladmins` DROP `userlevel` ; ALTER TABLE `tbladmins` DROP `ordernotifications` ; INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('CCProcessDaysBefore', '0'); INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('CCAttemptOnlyOnce', ''); INSERT INTO `tblconfiguration` (`setting` ,`value` )VALUES ('CCDaySendExpiryNotices', '25'); UPDATE tblclients SET country = 'SH' WHERE country = 'AC'; UPDATE tblclients SET country = 'TL' WHERE country = 'TP'; UPDATE tblclients SET country = 'GQ' WHERE country = 'GC'; UPDATE tblclients SET country = 'FR' WHERE country = 'FX'; UPDATE tblclients SET country = 'GH' WHERE country = 'GA'; UPDATE tblclients SET country = 'GI' WHERE country = 'BI'; UPDATE tblclients SET country = 'IM' WHERE country = 'GB4'; UPDATE tblclients SET country = 'JE' WHERE country = 'JR'; UPDATE tblclients SET country = 'GB' WHERE country = 'UK'; UPDATE tblclients SET country = 'RS' WHERE country = 'YU'; UPDATE tblclients SET country = 'CD' WHERE country = 'ZR'; UPDATE tbltax SET country = 'SH' WHERE country = 'AC'; UPDATE tbltax SET country = 'TL' WHERE country = 'TP'; UPDATE tbltax SET country = 'GQ' WHERE country = 'GC'; UPDATE tbltax SET country = 'FR' WHERE country = 'FX'; UPDATE tbltax SET country = 'GH' WHERE country = 'GA'; UPDATE tbltax SET country = 'GI' WHERE country = 'BI'; UPDATE tbltax SET country = 'IM' WHERE country = 'GB4'; UPDATE tbltax SET country = 'JE' WHERE country = 'JR'; UPDATE tbltax SET country = 'GB' WHERE country = 'UK'; UPDATE tbltax SET country = 'RS' WHERE country = 'YU'; UPDATE tbltax SET country = 'CD' WHERE country = 'ZR'; CREATE TABLE IF NOT EXISTS `tblaffiliateswithdrawals` (`id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,`affiliateid` INT( 3 ) NOT NULL ,`date` DATE NOT NULL ,`description` TEXT NOT NULL ,`amount` DECIMAL( 10, 2 ) NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; UPDATE tblinvoiceitems SET type='LateFee' WHERE description LIKE 'Late Fee%'; PK F'Z~?t{ { upgrade740release1.sqlnu �[��� -- New Telephone Dropdown Setting INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('PhoneNumberDropdown', '1'); PK F'Zzj��� � upgrade792release1.sqlnu �[��� -- Add new field to tblhostingaddons for subscriptionid set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblhostingaddons' and column_name='subscriptionid') = 0, 'alter table `tblhostingaddons` add `subscriptionid` VARCHAR(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT \'\' AFTER `notes`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'Z�J'd d upgrade321.sqlnu �[��� INSERT INTO `tblconfiguration` (`setting` ,`value` ) VALUES ('ProductMonthlyPricingBreakdown', ''); PK F'ZT�7W� � upgrade810alpha1.sqlnu �[��� -- Add new field to tblticketdepartments for mail_auth_config set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblticketdepartments' and column_name='mail_auth_config') = 0, 'ALTER TABLE `tblticketdepartments` ADD `mail_auth_config` TEXT AFTER `password`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'ZR�*� � upgrade740beta1.sqlnu �[��� -- Create notification providers table. CREATE TABLE IF NOT EXISTS `tblnotificationproviders` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `settings` text COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 0, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; -- Create notification rules table. CREATE TABLE IF NOT EXISTS `tblnotificationrules` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `event_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `events` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `conditions` text COLLATE utf8_unicode_ci NOT NULL, `provider` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `provider_config` text COLLATE utf8_unicode_ci NOT NULL, `active` tinyint(4) NOT NULL DEFAULT 0, `can_delete` tinyint(4) NOT NULL DEFAULT 0, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; -- Add notifications permission to full administrator role. INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES ('1', '144'); PK F'Z--�j� � upgrade850beta1.sqlnu �[��� -- Add new index (tblcreditcards_last_four) for last_four column in tblcreditcards set @query = if ((SELECT count(INDEX_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = database() AND TABLE_NAME = 'tblcreditcards' AND INDEX_NAME = 'tblcreditcards_last_four') = 0, 'CREATE INDEX `tblcreditcards_last_four` ON `tblcreditcards` (`last_four`(4))', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'ZH��� � upgrade810release1.sqlnu �[��� -- Update tblmodulelog to have mediumtext columns ALTER table `tblmodulelog` modify `request` mediumtext not null, modify `response` mediumtext not null, modify `arrdata` mediumtext not null;PK F'Z+�� upgrade830release1.sqlnu �[��� -- Create indices to improve cart performance set @query = if ((SELECT count(*) FROM (SELECT GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) idx_cols FROM information_schema.statistics WHERE table_schema=database() AND TABLE_NAME='tblpricing' GROUP BY INDEX_NAME) i WHERE idx_cols = 'relid') = 0, 'ALTER TABLE `tblpricing` ADD INDEX `pricing_relid_idx` (`relid`);', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((SELECT count(*) FROM (SELECT GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) idx_cols FROM information_schema.statistics WHERE table_schema=database() AND TABLE_NAME='tblpricing' GROUP BY INDEX_NAME) i WHERE idx_cols = 'currency') = 0, 'ALTER TABLE `tblpricing` ADD INDEX `pricing_currency_idx` (`currency`);', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((SELECT count(*) FROM (SELECT GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX) idx_cols FROM information_schema.statistics WHERE table_schema=database() AND TABLE_NAME='tblpricing' GROUP BY INDEX_NAME) i WHERE idx_cols = 'type') = 0, 'ALTER TABLE `tblpricing` ADD INDEX `pricing_type_idx` (`type`);', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement;PK F'ZY�Q�} } upgrade610alpha1.sqlnu �[��� -- Create the product group feature table CREATE TABLE IF NOT EXISTS `tblproduct_group_features` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `product_group_id` int(10) NOT NULL, `feature` text COLLATE utf8_unicode_ci NOT NULL, `order` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`), KEY `tblproduct_group_features_product_group_id_index` (`product_group_id`), KEY `tblproduct_group_features_id_product_group_id_index` (`id`,`product_group_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Add the headline column to tblproductgroups set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblproductgroups' and column_name='headline') = 0, 'alter table tblproductgroups add `headline` text after `name`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add the tagline column to tblproductgroups set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblproductgroups' and column_name='tagline') = 0, 'alter table tblproductgroups add `tagline` text after `headline`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add the is_featured column to tblproducts set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblproducts' and column_name='is_featured') = 0, 'alter table tblproducts add `is_featured` tinyint(1) not null after `retired`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add the is_featured column to tblbundles set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblbundles' and column_name='is_featured') = 0, 'alter table tblbundles add `is_featured` tinyint(1) not null after `sortorder`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add the Health and Updates permission to Full Admin role INSERT INTO tbladminperms (`roleid`, `permid`) VALUES (1, 132); -- Set order form sidebar toggle setting to on by default INSERT INTO tblconfiguration (setting, value) VALUES ('OrderFormSidebarToggle', '1'); PK F'Z.x�5 5 upgrade800alpha1.sqlnu �[��� -- Modify the datatype of tbltax.taxrate alter table `tbltax` modify `taxrate` DECIMAL(10,3) NOT NULL default '0.000'; -- Modify the datatype of tblinvoices.taxrate alter table `tblinvoices` modify `taxrate` DECIMAL(10,3) NOT NULL default '0.000'; -- Modify the datatype of tblinvoices.taxrate2 alter table `tblinvoices` modify `taxrate2` DECIMAL(10,3) NOT NULL default '0.000'; -- Modify pricing columns to DECIMAL(16,2) alter table `tblaccounts` modify `amountin` decimal(16,2) default 0.00 not null; alter table `tblaccounts` modify `fees` decimal(16,2) default 0.00 not null; alter table `tblaccounts` modify `amountout` decimal(16,2) default 0.00 not null; alter table `tblaccounts` modify `rate` decimal(16,5) default 1.00000 not null; alter table `tblaffiliates` modify `payamount` decimal(16,2) not null; alter table `tblaffiliates` modify `balance` decimal(16,2) default 0.00 not null; alter table `tblaffiliates` modify `withdrawn` decimal(16,2) default 0.00 not null; alter table `tblaffiliateshistory` modify `amount` decimal(16,2) not null; alter table `tblaffiliatespending` modify `amount` decimal(16,2) not null; alter table `tblaffiliateswithdrawals` modify `amount` decimal(16,2) not null; alter table `tblbillableitems` modify `amount` decimal(16,2) not null; alter table `tblbundles` modify `displayprice` decimal(16,2) not null; alter table `tblclients` modify `credit` decimal(16,2) not null; alter table `tblcredit` modify `amount` decimal(16,2) not null; alter table `tbldomainpricing` modify `grace_period_fee` decimal(16,2) default 0.00 not null; alter table `tbldomainpricing` modify `redemption_grace_period_fee` decimal(16,2) default -1.00 not null; alter table `tbldomainpricing_premium` modify `to_amount` decimal(16,2) default 0.00 not null; alter table `tbldomains` modify `firstpaymentamount` decimal(16,2) default 0.00 not null; alter table `tbldomains` modify `recurringamount` decimal(16,2) not null; alter table `tblhosting` modify `firstpaymentamount` decimal(16,2) default 0.00 not null; alter table `tblhosting` modify `amount` decimal(16,2) default 0.00 not null; alter table `tblhostingaddons` modify `setupfee` decimal(16,2) default 0.00 not null; alter table `tblhostingaddons` modify `recurring` decimal(16,2) default 0.00 not null; alter table `tblinvoiceitems` modify `amount` decimal(16,2) default 0.00 not null; alter table `tblinvoices` modify `subtotal` decimal(16,2) not null; alter table `tblinvoices` modify `credit` decimal(16,2) not null; alter table `tblinvoices` modify `tax` decimal(16,2) not null; alter table `tblinvoices` modify `tax2` decimal(16,2) not null; alter table `tblinvoices` modify `total` decimal(16,2) default 0.00 not null; alter table `tblorders` modify `amount` decimal(16,2) not null; alter table `tblpricing` modify `msetupfee` decimal(16,2) not null; alter table `tblpricing` modify `qsetupfee` decimal(16,2) not null; alter table `tblpricing` modify `ssetupfee` decimal(16,2) not null; alter table `tblpricing` modify `asetupfee` decimal(16,2) not null; alter table `tblpricing` modify `bsetupfee` decimal(16,2) not null; alter table `tblpricing` modify `tsetupfee` decimal(16,2) not null; alter table `tblpricing` modify `monthly` decimal(16,2) not null; alter table `tblpricing` modify `quarterly` decimal(16,2) not null; alter table `tblpricing` modify `semiannually` decimal(16,2) not null; alter table `tblpricing` modify `annually` decimal(16,2) not null; alter table `tblpricing` modify `biennially` decimal(16,2) not null; alter table `tblpricing` modify `triennially` decimal(16,2) not null; alter table `tblproducts` modify `affiliatepayamount` decimal(16,2) not null; alter table `tblpromotions` modify `value` decimal(16,2) default 0.00 not null; alter table `tblquoteitems` modify `unitprice` decimal(16,2) not null; alter table `tblquoteitems` modify `discount` decimal(16,2) not null; alter table `tblquotes` modify `subtotal` decimal(16,2) not null; alter table `tblquotes` modify `tax1` decimal(16,2) not null; alter table `tblquotes` modify `tax2` decimal(16,2) not null; alter table `tblquotes` modify `total` decimal(16,2) not null; alter table `tblservers` modify `monthlycost` decimal(16,2) default 0.00 not null; alter table `tbltransaction_history` modify `amount` decimal(16,2) default 0.00 not null; alter table `tblupgrades` modify `amount` decimal(16,2) not null; alter table `tblupgrades` modify `credit_amount` decimal(16,2) not null; alter table `tblupgrades` modify `new_recurring_amount` decimal(16,2) not null; alter table `tblupgrades` modify `recurringchange` decimal(16,2) not null; -- Multi-user auth changes -- Add new field to tblactivitylog for user_id set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblactivitylog' and column_name='user_id') = 0, 'ALTER TABLE `tblactivitylog` ADD `user_id` INT(10) UNSIGNED NOT NULL DEFAULT \'0\' AFTER `userid`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblactivitylog for admin_id set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblactivitylog' and column_name='admin_id') = 0, 'ALTER TABLE `tblactivitylog` ADD `admin_id` INT(10) UNSIGNED NOT NULL DEFAULT \'0\' AFTER `user_id`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new index to tblactivitylog for user_id set @query = if ((select count(*) from information_schema.statistics where table_schema=database() and table_name='tblactivitylog' and column_name='user_id') = 0, 'CREATE INDEX `user_id` ON tblactivitylog(user_id)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new index to tblactivitylog for admin_id set @query = if ((select count(*) from information_schema.statistics where table_schema=database() and table_name='tblactivitylog' and column_name='admin_id') = 0, 'CREATE INDEX `admin_id` ON tblactivitylog(admin_id)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tbltickets for requestor_id set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbltickets' and column_name='requestor_id') = 0, 'ALTER TABLE `tbltickets` ADD `requestor_id` INT(10) UNSIGNED NOT NULL DEFAULT \'0\' AFTER `contactid`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblticketreplies for requestor_id set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblticketreplies' and column_name='requestor_id') = 0, 'ALTER TABLE `tblticketreplies` ADD `requestor_id` INT(10) UNSIGNED NOT NULL DEFAULT \'0\' AFTER `contactid`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblauthn_account_links for user_id set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblauthn_account_links' and column_name='user_id') = 0, 'ALTER TABLE `tblauthn_account_links` ADD `user_id` INT(11) DEFAULT NULL AFTER `remote_user_id`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- User related email template removals DELETE FROM tblemailtemplates WHERE name='Automated Password Reset'; DELETE FROM tblemailtemplates WHERE name='Client Email Address Verification'; DELETE FROM tblemailtemplates WHERE name='Password Reset Confirmation'; DELETE FROM tblemailtemplates WHERE name='Password Reset Validation'; -- permission for View and Manage Users INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 150), (1, 151); -- Create index to speed up username based lookups CORE-14623 set @query = if ((select count(*) from information_schema.statistics where table_schema=database() and table_name='tblhosting' and column_name = 'username') = 0, 'create index `username` on `tblhosting` (`username`(8))', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add slug field to products and groups set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblproducts' and column_name='slug') = 0, 'ALTER TABLE `tblproducts` ADD `slug` VARCHAR(128) NOT NULL DEFAULT \'\' AFTER `name`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblproductgroups' and column_name='slug') = 0, 'ALTER TABLE `tblproductgroups` ADD `slug` VARCHAR(128) NOT NULL DEFAULT \'\' AFTER `name`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblemails for attachments set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemails' and column_name='attachments') = 0, 'alter table `tblemails` add `attachments` TEXT COLLATE utf8_unicode_ci DEFAULT NULL AFTER `bcc`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblemails for pending set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemails' and column_name='pending') = 0, 'alter table `tblemails` add `pending` tinyint(1) NOT NULL DEFAULT \'0\' AFTER `attachments`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblemails for message_data set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemails' and column_name='message_data') = 0, 'alter table `tblemails` add `message_data` MEDIUMTEXT COLLATE utf8_unicode_ci DEFAULT NULL AFTER `pending`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblemails for failed set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemails' and column_name='failed') = 0, 'alter table `tblemails` add `failed` tinyint(1) NOT NULL DEFAULT \'0\' AFTER `message_data`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblemails for failure_reason set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemails' and column_name='failure_reason') = 0, 'alter table `tblemails` add `failure_reason` VARCHAR(250) COLLATE utf8_unicode_ci NOT NULL DEFAULT \'\' AFTER `failed`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblemails for retry_count set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemails' and column_name='retry_count') = 0, 'alter table `tblemails` add `retry_count` tinyint(1) NOT NULL DEFAULT \'0\' AFTER `failure_reason`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblemails for campaign_id set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemails' and column_name='campaign_id') = 0, 'alter table `tblemails` add `campaign_id` int(10) NOT NULL DEFAULT \'0\' AFTER `retry_count`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblemails for created_at set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemails' and column_name='created_at') = 0, 'alter table `tblemails` add `created_at` timestamp NULL DEFAULT NULL AFTER `retry_count`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblemails for updated_at set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblemails' and column_name='updated_at') = 0, 'alter table `tblemails` add `updated_at` timestamp NULL DEFAULT NULL AFTER `created_at`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new index to tblemails for pending set @query = if ((select count(*) from information_schema.statistics where table_schema=database() and table_name='tblemails' and column_name='pending') = 0, 'CREATE INDEX `pending` ON tblemails(pending)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new index to tblemails for campaign_id set @query = if ((select count(*) from information_schema.statistics where table_schema=database() and table_name='tblemails' and column_name='campaign_id') = 0, 'CREATE INDEX `campaign_id` ON tblemails(campaign_id)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; CREATE TABLE IF NOT EXISTS `tblerrorlog` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `severity` varchar(16) NOT NULL, `exception_class` varchar(255), `message` varchar(255), `filename` varchar(255), `line` int(10) unsigned, `details` mediumtext, `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; PK F'Z��� � upgrade341.sqlnu �[��� CREATE TABLE IF NOT EXISTS `tblaffiliatespending` (`id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,`affaccid` INT( 1 ) NOT NULL ,`amount` DECIMAL( 10, 2 ) NOT NULL ,`clearingdate` DATE NOT NULL ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('AffiliatesDelayCommission', '0'); ALTER TABLE `tblhosting` CHANGE `domainstatus` `domainstatus` ENUM( 'Pending', 'Active', 'Suspended', 'Terminated', 'Cancelled', 'Fraud' ) NOT NULL ; ALTER TABLE `tblhostingaddons` CHANGE `status` `status` ENUM( 'Pending', 'Active', 'Terminated', 'Cancelled', 'Fraud' ) NOT NULL ; ALTER TABLE `tbldomains` CHANGE `status` `status` ENUM( 'Pending', 'Active', 'Expired', 'Cancelled', 'Fraud' ) NOT NULL ; INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`, `message`) VALUES ('support', 'Bounce Message', 'Support Ticket Not Opened', '<p>[Name],</p><p>Your email to our support system could not be accepted because it was not recognized as coming from an email address belonging to one of our customers. If you need assistance, please email from the address you registered with us that you use to login to our client area.</p><p>[Signature]</p>'); PK F'Z�'SXm m upgrade840alpha1.sqlnu �[��� -- Add new fields to tbljobs_queue table set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbljobs_queue' and column_name='async') = 0, 'ALTER TABLE `tbljobs_queue` ADD `async` tinyint(1) unsigned NOT NULL DEFAULT 0 AFTER `digest_hash`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tbljobs_queue' and column_name='started_at') = 0, 'ALTER TABLE `tbljobs_queue` ADD `started_at` datetime DEFAULT NULL AFTER `available_at`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- realign upgrades with fresh install schema for tblactivitylog ALTER TABLE tblactivitylog MODIFY `userid` int unsigned NOT NULL DEFAULT '0'; -- realign upgrades with fresh install schema for tblorders set @query = if ((select count(*) from information_schema.statistics where table_schema=database() and table_name='tblorders' and index_name='requestor_id') = 0, 'ALTER TABLE tblorders ADD KEY `requestor_id` (`requestor_id`)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- realign upgrades with fresh install schema for tblusers ALTER TABLE tblusers MODIFY `reset_token` varchar(255) NOT NULL DEFAULT ''; PK F'Z�d _2 2 upgrade761release1.sqlnu �[��� -- Update Indian state name from Orissa to Odisha update `tblclients` set `state`='Odisha' where `state`='Orissa'; update `tblcontacts` set `state`='Odisha' where `state`='Orissa'; update `tblquotes` set `state`='Odisha' where `state`='Orissa'; update `tbltax` set `state`='Odisha' where `state`='Orissa'; PK F'ZH�G� � upgrade750release1.sqlnu �[��� -- permission for Client Data Export INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES (1, 146); CREATE TABLE IF NOT EXISTS `tblioncube_file_log` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `filename` text COLLATE utf8_unicode_ci NOT NULL, `content_hash` varchar(512) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `encoder_version` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `bundled_php_versions` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `loaded_in_php` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;PK F'Z����� � upgrade870beta2.sqlnu �[��� -- Modify hours columns to DECIMAL(5,2) alter table `tblbillableitems` modify `hours` decimal(5,2) not null; -- Add new index for relid column in tblcustomfieldsvalues set @query = if ((SELECT count(INDEX_NAME) FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = database() AND TABLE_NAME = 'tblcustomfieldsvalues' AND INDEX_NAME = 'relid') = 0, 'CREATE INDEX `relid` ON `tblcustomfieldsvalues` (`relid`)', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; PK F'ZK�9�I I upgrade790alpha1.sqlnu �[��� -- Add new configuration value for AutoNumberingResetMonth set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'AutoNumberingResetMonth') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('AutoNumberingResetMonth', CONCAT_WS('-', YEAR(CURRENT_DATE()), MONTH(CURRENT_DATE())), now(), now());",'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new configuration value for AutoPaidNumberingResetMonth set @query = if ((select count(*) from `tblconfiguration` where `setting` = 'AutoPaidNumberingResetMonth') = 0, "INSERT INTO `tblconfiguration` (`setting`, `value`, `created_at`, `updated_at`) VALUES ('AutoPaidNumberingResetMonth', CONCAT_WS('-', YEAR(CURRENT_DATE()), MONTH(CURRENT_DATE())), now(), now());",'DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new payment gateway product mapping table CREATE TABLE IF NOT EXISTS `tblpaymentgateways_product_mapping` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `gateway` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `account_identifier` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `product_identifier` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `remote_identifier` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `created_at` timestamp NULL DEFAULT '0000-00-00 00:00:00', `updated_at` timestamp NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Add new field to tblinvoices for date_refunded set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblinvoices' and column_name='date_refunded') = 0, 'alter table `tblinvoices` add `date_refunded` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\' AFTER `last_capture_attempt`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblinvoices for date_cancelled set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblinvoices' and column_name='date_cancelled') = 0, 'alter table `tblinvoices` add `date_cancelled` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\' AFTER `date_refunded`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblinvoices for created_at set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblinvoices' and column_name='created_at') = 0, 'alter table `tblinvoices` add `created_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\' AFTER `notes`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- Add new field to tblinvoices for updated_at set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblinvoices' and column_name='updated_at') = 0, 'alter table `tblinvoices` add `updated_at` timestamp NOT NULL DEFAULT \'0000-00-00 00:00:00\' AFTER `created_at`', 'DO 0'); prepare statement from @query; execute statement; deallocate prepare statement; -- update type of gateways to BankAccount UPDATE `tblpaymentgateways` SET `value` = 'Bank' WHERE `setting` = 'type' AND `gateway` IN ('authorizeecheck', 'bluepayecheck', 'directdebit'); -- Update pricing enum type to include usage billing values set @query = if ((select count(*) from information_schema.columns where table_schema=database() and table_name='tblpricing' and column_name='type' and column_type='enum("product","addon","configoptions","domainregister","domaintransfer","domainrenew","domainaddons")') = 0, 'ALTER TABLE `tblpricing` CHANGE `type` `type` enum("product","addon","configoptions","domainregister","domaintransfer","domainrenew","domainaddons","usage") CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL','DO 0;'); prepare statement from @query; execute statement; deallocate prepare statement; CREATE TABLE IF NOT EXISTS `tblpricing_bracket` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `floor` decimal(19,6) NOT NULL DEFAULT '0.000000', `ceiling` decimal(19,6) NOT NULL DEFAULT '0.000000', `rel_type` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `rel_id` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `schema_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'flat', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tbltenant_stats` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `tenant_id` int(11) NOT NULL DEFAULT '0', `metric` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `value` decimal(19,6) NOT NULL DEFAULT '0.000000', `measured_at` decimal(18,6) NOT NULL DEFAULT '0.000000', `invoice_id` int(11) DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `tenant_id` (`tenant_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tblserver_tenants` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `server_id` int(11) NOT NULL DEFAULT '0', `tenant` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `server_tenant` (`tenant`,`server_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tblusage_items` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `rel_type` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `rel_id` int(11) NOT NULL DEFAULT '0', `module_type` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `module` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `metric` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `included` decimal(19,6) NOT NULL DEFAULT '0.000000', `is_hidden` tinyint(4) NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `tblusage_items_rel_type_id` (`rel_type`,`rel_id`), KEY `tblusage_items_module_type` (`module_type`), KEY `tblusage_items_module` (`module`), KEY `tblusage_items_metric` (`metric`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; PK F'Z�5��� � upgrade521.sqlnu �[��� ALTER TABLE `tblclients` ADD `authmodule` TEXT NOT NULL AFTER `password` , ADD `authdata` TEXT NOT NULL AFTER `authmodule` ; ALTER TABLE `tblproducts` ADD `upgradechargefullcycle` INT( 1 ) NOT NULL AFTER `billingcycleupgrade`; INSERT INTO `tbladminperms` (`roleid`, `permid`) VALUES ('1', '125'), ('1', '126'), ('1', '127'), ('1', '128'), ('1', '129'), ('2', '125'), ('2', '126'), ('2', '128'), ('2', '129'), ('3', '125'), ('3', '128'); PK F'Z%�}�' ' index.phpnu �[��� <?php //ICB0 72:0 81:1040 ?><?php //00cb7 // ************************************************************************* // * * // * WHMCS - The Complete Client Management, Billing & Support Solution * // * Copyright (c) WHMCS Ltd. All Rights Reserved, * // * Version:8.8.0 (8.8.0-release.1) * // * BuildId:06fc63b.326 * // * Build Date:20 Sep 2023 * // * * // ************************************************************************* // * * // * Email: info@whmcs.com * // * Website: http://www.whmcs.com * // * * // ************************************************************************* // * * // * This software is furnished under a license and may be used and copied * // * only in accordance with the terms of such license and with the * // * inclusion of the above copyright notice. This software or any other * // * copies thereof may not be provided or otherwise made available to any * // * other person. No title to and ownership of the software is hereby * // * transferred. * // * * // * You may not reverse engineer, decompile, defeat license encryption * // * mechanisms, or disassemble this software product or software product * // * license. WHMCompleteSolution may terminate this license if you don't * // * comply with any of the terms and conditions set forth in our end user * // * license agreement (EULA). In such event, licensee agrees to return * // * licensor or destroy all copies of software upon termination of the * // * license. * // * * // * Please see the EULA file for the full End User License Agreement. * // * * // ************************************************************************* if(extension_loaded('ionCube Loader')){die('The file '.__FILE__." is corrupted.\n");}echo("\nScript error: the ".(($cli=(php_sapi_name()=='cli')) ?'ionCube':'<a href="https://www.ioncube.com">ionCube</a>')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' <a href="https://get-loader.ioncube.com">get-loader.ioncube.com</a> and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' <a href="http://ioncu.be/LV">http://ioncu.be/LV</a> ')."\n\n");exit(199); ?> HR+cPnZ7h58wBXLbitGvSNz00Bpou3YtoovvyUHz6oarONjDG+XydNzt0eifHmNE+4nWxW1eMyQJ xtRUJvqA5/czK1XpKZr3XZTwVMKfq1258kHryerTjyO+n9WLN7C3bJ6bZPSCWjShokQ3isXt+miU 4btubYSk/cl6slowwfGj0b9pEC33B1blGfFpjjydCkL5Xh0+v+9CQJMWIhbkIc7lKKQ5rDNixzvg mXyUDK2H4dHs0reWAWYVT+bLi6oPjDJZFN0F6CJSHMwigOPaSo/5yqjKTtESigbrE/gMBu/tP3eI aHEDU6mFZPFQPsvYyboq5i9KJb//i2c+diKBFwG9GYO2FJTwiG322Mo3dn1B9gt0UkKDAD7+6e4w Ijq5hR0lokM7kjci1l3PG4qkjuo0jQtdIibHZ/pTG5ocYqhhOhvH+1YgUwUVt2RpNHX2HeQ2+kSY Z1b+9q9CpLnGDqk7gVn0RvfsmTT7YVz+D6VMEr2Ro4GARMlsESHFRKWvceGFiGreQP9wA72iB20q aFcgW4A4vwhRJYSF7TriYR65fBz0YaRBaaDJ0mT7oMpiIMDvsByN/VhMcQsmRDJcW4lFeyYpVU4s 04qH6yecAMrpIN/f1eTcdxauzISeVsXflAQJoDCU0wTASxwlgb3ibbjlWgAZO1h2QfgrxPnFDQyl EKG7EGXiJ2lk3NBt1VCdrlr5JGtj3uSeTQVQY21JVElIj1HX9JGJjLl1KWon7uK70GQPWD64PfY0 AOz9OcHEN3VJuBj/EZjvdYG5TciEbwVlFGDEYktGmoQpa1oJ5YlSUBOBf51qd/m9tiUewY5SvEVE z8MF7Ls7QMB1392p1x8DqmIr4cV8P9TPk50ipDY0VIjwkjl4pbe== HR+cPu/AurhiBjYTcNHsUP7SekKnaTpYlG2x1D6iN19bmjvp9SufJ62VxRrk3xzDPX+LMnf3zKRh KOOnTouuOH2hCfexuyOdq77FQznHs7HZZlyqrsu2DVNjBhiTAF7LzeKqMjidNW8FBqCa2j90Ugf+ Z08xB2Gw54f+jk9ToAJX9ZkWTUpuRIzOtjJTfus6ZN7ZGUOW52AcRJ1T8XxwmPpCD59hD/DFLGMa ZVomt9Fr5y1bg7zk531HwSsRvm/3L0TSqqRuBuI12PWRyhvY/H6vIMujJ17VCG7R0e5C1dG77BbF E2lmYcoi8rn8Eauli/2hos6ePXqerjgoMphLckWESICUCZhkXcV0wr+UFmdajD3PapkK3sqvxPMb awoQb9sUA1oUIZjIluPGBUUulPGu2ABX4pKu+oVdKabpIHnZY2mkkUR9rUw5cMTgFmPhUHshUmMm oyvZw6X1+HKqMEFCN11JEPQgUO0c5WPGpzmq1Obt+oLRRo8V3kdeBQ7UNgWllgwhj9ZvvcQW6oYR mt8IMTR+brKhQ9E4kBLXmzb5g96kEnzQNPQ2jF2Hzt13Ggr8g3GfX5WHySCiWAvWh2tufjHcg+MW igGnqE2YZBW4bnBSb3Jl5+XVzMZk7/hSrwcRySUKp/HFooAZPq2plqP60UjtgIdZ5eUvvbY3BMT2 XGBSevBRM0W7cnA77X0dGtuDUFOGBcUyg+Gc56NgOfq0AeEyPNQ9XIkyRiqe6IYpvp6OrbVzkDw6 50MkNE6HKamElZjK331CXsudGCRFHFVKSEUt2kpaCYoyDm0JWGzQa6RteN38ZMfL3icSL0SBkkrm N+v8apc6bPq09HautB1uw5CIX33H5FT1GM5AC2sWEhcO9JVZWIdT2fTeoNxEJV6bwSvyG0==PK F'ZW3z�� � upgrade530.sqlnu �[��� UPDATE `tblemailtemplates` SET `message` = '<p> Dear {$client_name}, </p> <p> This is a billing notice that your invoice no. {$invoice_num} which was generated on {$invoice_date_created} is now overdue. </p> <p> Your payment method is: {$invoice_payment_method} </p> <p> Invoice: {$invoice_num}<br /> Balance Due: {$invoice_balance}<br /> Due Date: {$invoice_date_due} </p> <p> You can login to your client area to view and pay the invoice at {$invoice_link} </p> <p> {$signature} </p>' WHERE `type` = 'invoice' AND `name` = 'First Invoice Overdue Notice' AND `message` = '<p> Dear {$client_name}, </p> <p> This is a billing notice that your invoice no. {$invoice_num} which was generated on {$invoice_date_created} is now overdue. </p> <p> Your payment method is: {$invoice_payment_method} </p> <p> Invoice: {$invoice_num}<br /> Balance Due: {$invoice_balance}<br /> Due Date: {$invoice_date_due} </p> <p> You can login to your client area to view and pay the invoice at {$invoice_link} </p> <p> Your login details are as follows: </p> <p> Email Address: {$client_email}<br /> Password: {$client_password} </p> <p> {$signature} </p>'; UPDATE `tblemailtemplates` SET `message` = '<p> Dear {$client_name}, </p> <p> This is the second billing notice that your invoice no. {$invoice_num} which was generated on {$invoice_date_created} is now overdue. </p> <p> Your payment method is: {$invoice_payment_method} </p> <p> Invoice: {$invoice_num}<br /> Balance Due: {$invoice_balance}<br /> Due Date: {$invoice_date_due} </p> <p> You can login to your client area to view and pay the invoice at {$invoice_link} </p> <p> {$signature} </p>' WHERE `type` = 'invoice' AND `name` = 'Second Invoice Overdue Notice' AND `message` = '<p> Dear {$client_name}, </p> <p> This is the second billing notice that your invoice no. {$invoice_num} which was generated on {$invoice_date_created} is now overdue. </p> <p> Your payment method is: {$invoice_payment_method} </p> <p> Invoice: {$invoice_num}<br /> Balance Due: {$invoice_balance}<br /> Due Date: {$invoice_date_due} </p> <p> You can login to your client area to view and pay the invoice at {$invoice_link} </p> <p> Your login details are as follows: </p> <p> Email Address: {$client_email}<br /> Password: {$client_password} </p> <p> {$signature} </p>'; UPDATE `tblemailtemplates` SET `message` = '<p> Dear {$client_name}, </p> <p> This is the third and final billing notice that your invoice no. {$invoice_num} which was generated on {$invoice_date_created} is now overdue. Failure to make payment will result in account suspension.</p> <p> Your payment method is: {$invoice_payment_method} </p> <p> Invoice: {$invoice_num}<br /> Balance Due: {$invoice_balance}<br /> Due Date: {$invoice_date_due} </p> <p> You can login to your client area to view and pay the invoice at {$invoice_link} </p> <p> {$signature} </p>' WHERE `type` = 'invoice' AND `name` = 'Third Invoice Overdue Notice' AND `message` = '<p> Dear {$client_name}, </p> <p> This is the third and final billing notice that your invoice no. {$invoice_num} which was generated on {$invoice_date_created} is now overdue. Failure to make payment will result in account suspension.</p> <p> Your payment method is: {$invoice_payment_method} </p> <p> Invoice: {$invoice_num}<br /> Balance Due: {$invoice_balance}<br /> Due Date: {$invoice_date_due} </p> <p> You can login to your client area to view and pay the invoice at {$invoice_link} </p> <p> Your login details are as follows: </p> <p> Email Address: {$client_email}<br /> Password: {$client_password} </p> <p> {$signature} </p>'; DELETE FROM `tblaffiliatesaccounts` WHERE relid NOT IN (SELECT id FROM tblhosting); INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`, `message`, `attachments`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES ('support', 'Replies Only Bounce Message', 'Online Submission Required', '<p>{$client_name},</p><p>Your email to our support system could not be accepted because we require you to submit all tickets via our online client support portal. You can do this at the URL below.</p><p><a href="{$whmcs_url}/submitticket.php">{$whmcs_url}/submitticket.php</a></p><p>{$signature}</p>', '', '', '', '', '', '', '', 0); UPDATE `tblemailtemplates` SET `name` = 'Clients Only Bounce Message' WHERE `name` = 'Bounce Message'; UPDATE `tblemailtemplates` SET `message` = '<p>Dear {$client_name},</p><p>Recently a request was submitted to reset your password for our client area. If you did not request this, please ignore this email. It will expire and become useless in 2 hours time.</p><p>To reset your password, please visit the url below:<br /><a href="{$pw_reset_url}">{$pw_reset_url}</a></p><p>When you visit the link above, you will have the opportunity to choose a new password.</p><p>{$signature}</p>' WHERE `type` = 'general' AND `name` = 'Password Reset Validation' AND `message` = '<p>Dear {$client_name},</p><p>Recently a request was submitted to reset your password for our client area. If you did not request this, please ignore this email. It will expire and become useless in 2 hours time.</p><p>To reset your password, please visit the url below:<br /><a href="{$pw_reset_url}">{$pw_reset_url}</a></p><p>When you visit the link above, your password will be reset, and the new password will be emailed to you.</p><p>{$signature}</p>'; INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`, `message`, `attachments`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `plaintext`) VALUES ('general', 'Unsubscribe Confirmation', 'Unsubscribe Confirmation', 'Dear {$client_name},<br /><br />We have now removed your email address from our mailing list.<br /><br />If this was a mistake or you change your mind, you can re-subscribe at any time from the My Details section of our client area.<br /><br /><a href="{$whmcs_url}/clientarea.php?action=details">{$whmcs_url}/clientarea.php?action=details</a><br /><br />{$signature}', '', '', '', '', '', '', '', 0); CREATE TABLE IF NOT EXISTS `tbltransientdata` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(1024) NOT NULL, `data` text NOT NULL, `expires` int(10) NOT NULL, PRIMARY KEY (`id`), KEY `name` (`name`(255)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COLLATE=utf8_unicode_ci; PK F'Z:2\ \ upgrade420.sqlnu �[��� ALTER TABLE `tblannouncements` ADD `parentid` INT( 10 ) NOT NULL , ADD `language` TEXT NOT NULL ; ALTER TABLE `tblknowledgebase` ADD `parentid` INT( 10 ) NOT NULL , ADD `language` TEXT NOT NULL ; ALTER TABLE `tblknowledgebasecats` ADD `catid` INT( 10 ) NOT NULL , ADD `language` TEXT NOT NULL ; ALTER TABLE `tbltickets` CHANGE `adminunread` `adminunread` TEXT NOT NULL ; ALTER TABLE `tblpromotions` ADD `requires` TEXT NOT NULL AFTER `appliesto` , ADD `requiresexisting` INT( 1 ) NOT NULL AFTER `requires` ; ALTER TABLE `tblcontacts` ADD `subaccount` INT( 1 ) NOT NULL DEFAULT '0' AFTER `phonenumber` , ADD `password` TEXT NOT NULL AFTER `subaccount` , ADD `permissions` TEXT NOT NULL AFTER `password`; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('CreateDomainInvoiceDaysBefore', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('NoInvoiceEmailOnOrder', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('TaxInclusiveDeduct', ''); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('LateFeeMinimum', '0.00'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('AutoProvisionExistingOnly', ''); CREATE TABLE IF NOT EXISTS `tblticketstatuses` ( `id` int(10) NOT NULL auto_increment, `title` text COLLATE utf8_unicode_ci NOT NULL, `color` text COLLATE utf8_unicode_ci NOT NULL, `sortorder` int(2) NOT NULL, `showactive` int(1) NOT NULL, `showawaiting` int(1) NOT NULL, `autoclose` int(1) NOT NULL, PRIMARY KEY (`id`) ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `tblticketstatuses` (`id`, `title`, `color`, `sortorder`, `showactive`, `showawaiting`, `autoclose`) VALUES (1, 'Open', '#779500', 1, 1, 1, 0), (2, 'Answered', '#000000', 2, 1, 0, 1), (3, 'Customer-Reply', '#ff6600', 3, 1, 1, 1), (4, 'Closed', '#888888', 10, 0, 0, 0), (5, 'On Hold', '#224488', 5, 1, 0, 0), (6, 'In Progress', '#cc0000', 6, 1, 0, 0); ALTER TABLE `tblhosting` ADD `promoid` INT( 10 ) NOT NULL AFTER `subscriptionid` ; ALTER TABLE `tbldomains` ADD `promoid` INT( 10 ) NOT NULL AFTER `subscriptionid` ; ALTER TABLE `tblpricing` ADD `triennially` DECIMAL( 10, 2 ) NOT NULL ; ALTER TABLE `tblpricing` ADD `tsetupfee` DECIMAL( 10, 2 ) NOT NULL AFTER `bsetupfee` ; UPDATE tblpricing SET triennially='-1' WHERE type='product'; INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('EnableDomainRenewalOrders', 'on'); INSERT INTO `tblconfiguration` (`setting`, `value`) VALUES ('EnableMassPay', 'on'); ALTER TABLE `tblorders` ADD `renewals` TEXT NOT NULL AFTER `transfersecret` ; ALTER TABLE `tblbillableitems` ADD `hours` DECIMAL( 5, 1 ) NOT NULL AFTER `description` ; PK F'Zg��IJ"