DELETE FROM `apw_Settings` WHERE `apw_Settings`.`name` = 'senderAddressHeader';
DELETE FROM `apw_Settings` WHERE `apw_Settings`.`name` = 'senderStateCode';
DELETE FROM `apw_Settings` WHERE `apw_Settings`.`name` = 'senderZipCode';


ALTER TABLE  `apw_Sponsor` ADD FOREIGN KEY (  `categoryId` ) REFERENCES  `apw_SponsorCategory` (
`id`
) ON DELETE RESTRICT ON UPDATE CASCADE ;



INSERT INTO  `apw_Settings` (
`name` ,
`idCategory` ,
`fieldType` ,
`label` ,
`value` ,
`options` ,
`description` ,
`required` ,
`system` ,
`sorter` ,
`added` ,
`changed`
)
VALUES (
'committeeChangesHeader',  '2',  'header',  '',  'Committee Changes',  '',  '',  'n',  'n',  '640', NOW( ) , NOW( )
), 

(
'committeeChangesSubject',  '2',  'text',  'Subject',  'Member has made changes to committee',  '',  '',  'y',  'n',  '650', NOW( ) , NOW( )
),
 
(
'committeeChangesFrom',  '2',  'text',  'From Email Address',  'APWA-MN <info@apwa-mn.com>',  '',  '',  'y',  'n',  '660', NOW( ) , NOW( )
), 

(
'committeeChangesTo',  '2',  'emails',  'To Email Address(es)',  'ira@dev.adaptainc.com',  '',  'Use commas to separate email addresses',  'n',  'n',  '670', NOW( ) , NOW( )
),

(
 'committeeChangesBodyEventAdded', '2', 'HtmlEditor', 'New Event Has Been Added', 'New event <a href="{eventLink}" title="view event">"{eventName}"</a> has been added to <a href="{linkToCommitteeEvents}" title="View events list">{committeeName}</a>
committee by <a href="{memberLink}">{memberFirstName} {memberLastName}</a>.', '', 'Constants: {eventName}, {eventLink}, {linkToCommitteeEvents}, {committeeName}, {memberLink}, {memberFirstName}, {memberLastName}', 'y', 'n', '680', NOW(), NOW()), 

(
'committeeChangesBodyEventDeleted', '2', 'HtmlEditor', 'Event Has Been Deleted', 'Event "{eventName}" has been deleted from <a href="{linkToCommitteeEvents}" title="View events list">{committeeName}</a>
committee by <a href="{memberLink}">{memberFirstName} {memberLastName}</a>.', '', 'Constants: {eventName}, {linkToCommitteeEvents}, {committeeName}, {memberLink}, {memberFirstName}, {memberLastName}', 'y', 'n', '690', NOW(), NOW()
), 

(
'committeeChangesBodyDocumentAdded', '2', 'HtmlEditor', 'New Document Has Been Added', 'New document "<a href="{documentLink}" title="view document">{documentName}</a>" has been added to "<a href="{linkToCommitteeDocuments}" title="View events list">{committeeName}</a>"
committee by <a href="{memberLink}">{memberFirstName} {memberLastName}</a>.', '', 'Constants: {documentName}, {documentLink}, {linkToCommitteeDocuments}, {committeeName}, {memberLink}, {memberFirstName}, {memberLastName} ', 'y', 'n', '700', NOW(), NOW()
), 
(
'committeeChangesBodyDocumentDeleted', '2', 'HtmlEditor', 'Document Has Been Deleted', 'Document "{documentName}" has been deleted from "<a href="{linkToCommitteeDocuments}" title="View events list">{committeeName}</a>"
committee by <a href="{memberLink}">{memberFirstName} {memberLastName}</a>.', '', 'Constants: {documentName}, {linkToCommitteeDocuments}, {committeeName}, {memberLink}, {memberFirstName}, {memberLastName} ', 'y', 'n', '710', NOW(), NOW()
)
;


INSERT INTO  `apw_SettingsOptions` (
`id` ,
`name` ,
`variable` ,
`value` ,
`type` ,
`sorter`
)
VALUES (
NULL ,  'committeeChangesBodyEventAdded',  'scriptOptions[enterMode]',  '2',  'string', NULL
), (
NULL ,  'committeeChangesBodyEventAdded',  'height',  '100',  'int', NULL
), (
NULL ,  'committeeChangesBodyEventAdded',  'toolbar',  'Basic',  'string', NULL
), (
NULL ,  'committeeChangesBodyEventAdded',  'mode',  'view',  'string', NULL
);


INSERT INTO  `apw_SettingsOptions` (
`id` ,
`name` ,
`variable` ,
`value` ,
`type` ,
`sorter`
)
VALUES (
NULL ,  'committeeChangesBodyEventDeleted',  'scriptOptions[enterMode]',  '2',  'string', NULL
), (
NULL ,  'committeeChangesBodyEventDeleted',  'height',  '100',  'int', NULL
), (
NULL ,  'committeeChangesBodyEventDeleted',  'toolbar',  'Basic',  'string', NULL
), (
NULL ,  'committeeChangesBodyEventDeleted',  'mode',  'view',  'string', NULL
);

INSERT INTO  `apw_SettingsOptions` (
`id` ,
`name` ,
`variable` ,
`value` ,
`type` ,
`sorter`
)
VALUES (
NULL ,  'committeeChangesBodyDocumentAdded',  'scriptOptions[enterMode]',  '2',  'string', NULL
), (
NULL ,  'committeeChangesBodyDocumentAdded',  'height',  '100',  'int', NULL
), (
NULL ,  'committeeChangesBodyDocumentAdded',  'toolbar',  'Basic',  'string', NULL
), (
NULL ,  'committeeChangesBodyDocumentAdded',  'mode',  'view',  'string', NULL
);

INSERT INTO  `apw_SettingsOptions` (
`id` ,
`name` ,
`variable` ,
`value` ,
`type` ,
`sorter`
)
VALUES (
NULL ,  'committeeChangesBodyDocumentDeleted',  'scriptOptions[enterMode]',  '2',  'string', NULL
), (
NULL ,  'committeeChangesBodyDocumentDeleted',  'height',  '100',  'int', NULL
), (
NULL ,  'committeeChangesBodyDocumentDeleted',  'toolbar',  'Basic',  'string', NULL
), (
NULL ,  'committeeChangesBodyDocumentDeleted',  'mode',  'view',  'string', NULL
);
