alter table cf_zz_HtmlBlockContent add constraint default_content default '' for content;
alter table cf_zz_DraftHtmlBlockContent add constraint default_draft_content default '' for content;

alter table cf_zz_PageContent add constraint default_description default '' for description;
alter table cf_zz_DraftPageContent add constraint default_draft_description default '' for description;

alter table cf_zz_PageContent add constraint default_header default '' for header;
alter table cf_zz_DraftPageContent add constraint default_draft_header default '' for header;

alter table cf_zz_PageContent add constraint default_keywords default '' for keywords;
alter table cf_zz_DraftPageContent add constraint default_draft_keywords default '' for keywords;

alter table cf_PartVersion add constraint default_comments default '' for comments;

alter table cf_zz_Log alter column backtrace varbinary(8000);

ALTER TABLE cf_Part2PartData
ADD CONSTRAINT cf_Part2PartData_fk_partId FOREIGN KEY (partId) REFERENCES cf_Part (id) ON DELETE CASCADE;

ALTER TABLE cf_Part2Process
ADD CONSTRAINT cf_Part2Process_fk_partId FOREIGN KEY (partId) REFERENCES cf_Part (id) ON DELETE CASCADE;

ALTER TABLE cf_Part2User
ADD CONSTRAINT cf_Part2User_fk_partId FOREIGN KEY (partId) REFERENCES cf_Part (id) ON DELETE CASCADE;

ALTER TABLE cf_PartVersion
ADD CONSTRAINT cf_PartVersion_fk_partId FOREIGN KEY (partId) REFERENCES cf_Part (id) ON DELETE CASCADE;

ALTER TABLE cf_Media
ADD CONSTRAINT cf_Media_fk_partId FOREIGN KEY (partId) REFERENCES cf_Part (id) ON DELETE CASCADE;

ALTER TABLE cf_Part2ProcessData
ADD CONSTRAINT cf_Part2ProcessData_fk_versionId FOREIGN KEY (versionId) REFERENCES cf_PartVersion (id) ON DELETE CASCADE;

ALTER TABLE cf_FormSubmissionValue
ADD CONSTRAINT cf_FormSubmissionValue_fk_submissionId FOREIGN KEY (submissionId) REFERENCES cf_Part2ProcessData (id) ON DELETE CASCADE;
