CREATE TABLE "tmp_dc_post_media" (
media_id INTEGER NOT NULL ,
post_id INTEGER NOT NULL ,
link_type VARCHAR(32) NOT NULL DEFAULT 'attachment' ,
CONSTRAINT pk_post_media PRIMARY KEY (media_id,post_id,link_type) 
);
INSERT INTO tmp_dc_post_media (media_id, post_id) SELECT media_id, post_id FROM dc_post_media;
DROP TABLE dc_post_media;
ALTER TABLE tm_dc_post_media RENAME dc_post_media;
UPDATE dc_setting SET setting_value = '/\.php$/i' WHERE setting_id = 'media_exclusion' AND setting_value = '';
UPDATE dc_version SET module = 'core', version = '2.4.0' WHERE module='core';
