ALTER TABLE `ma_Tribe`  
	ADD `memorandum` TEXT NOT NULL  AFTER `merchantId`,
	ADD `rawMemorandum` TEXT NOT NULL  AFTER `memorandum`;


ALTER TABLE `ma_LicenseTribe` CHANGE `status` `status` ENUM('pending','approved','declined','approved_pending','expired','memorandum_pending') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'pending';

-- -------------------------------
-- -------------------------------

INSERT INTO `ma_Settings` (`name`, `idCategory`, `fieldType`, `label`, `value`, `options`, `description`, `required`, `system`, `sorter`, `added`, `changed`) VALUES
('licenseNeedAgreeUserHeader', 7, 'header', '', 'License Needs Agree with Vendor Policy Memorandum (Vendor Users Notification)', '', '', 'n', 'n', 550, '2019-06-19 00:00:00', '2019-06-19 00:00:00'),
('licenseNeedAgreeUserSubject', 7, 'text', 'Subject', 'License #{id} needs Agree with Vendor Policy Memorandum ("{tribe}" tribe)', '', '', 'y', 'n', 560, '2019-06-19 00:00:00', '2019-06-19 00:00:00'),
('licenseNeedAgreeUserFrom', 7, 'text', 'From Email Address &nbsp; <span class="label_description">If you leave this field empty - the From Email Address will be the same as the one in General Settings.</span>', '', '', '', 'n', 'n', 570, '2019-06-19 00:00:00', '2019-06-19 00:00:00'),
('licenseNeedAgreeUserBody', 7, 'HtmlEditor', 'Message Body', '<p>License #{id} needs Agree to the Terms and Conditions contained in the Vendor Policy Memorandum:</p>\r\n\r\n<p><strong>Tribe</strong>: {tribe}<br/\r\n><strong>License #</strong>: {id}<br />\r\n</p><p><strong>DBA Name</strong>: {vendorDbaName}<br />\r\n<strong>Sole Proprietor:</strong> {vendorSoleProprietorName}<br />\r\n<strong>Federal ID</strong>: {vendorFederalId}<br />\r\n<strong>Phone</strong>: {vendorPhone}</p>\r\n\r\n<p>Go to <a href="{agreeUrl}">Agreement page</a> or <a href="{licenseSectionUrl}">Licensing section</a> of the website.</p></p>\r\n', '', 'Constants: {id} {vendorDbaName} {vendorSoleProprietorName} {vendorFederalId} {vendorPhone} {licenseSectionUrl} {agreeUrl} {tribe}', 'y', 'n', 580, '2019-06-19 00:00:00', '2019-06-19 00:00:00');

INSERT INTO `ma_SettingsOptions` (`name`, `variable`, `value`, `type`, `sorter`) VALUES
('licenseNeedAgreeUserBody', 'mode', 'view', 'string', NULL);

