Skip to content

Instantly share code, notes, and snippets.

@oliverthiele
Created September 14, 2016 10:26
Show Gist options
  • Save oliverthiele/ae0ecd44e6c1e015d7f17dfc094ccb2d to your computer and use it in GitHub Desktop.
Save oliverthiele/ae0ecd44e6c1e015d7f17dfc094ccb2d to your computer and use it in GitHub Desktop.
TYPO3 DB Updates for switching from EXT:css_styled_conten to EXT:fluid_styled_content
UPDATE tt_content SET CType='textmedia' WHERE tt_content.CType='text';
UPDATE tt_content SET CType='textmedia' WHERE tt_content.CType='textpic';
UPDATE tt_content SET CType='textmedia' WHERE tt_content.CType='images';
UPDATE tt_content LEFT JOIN sys_file_reference ON sys_file_reference.uid_foreign=tt_content.uid AND sys_file_reference.tablenames='tt_content' AND sys_file_reference.fieldname='image' SET tt_content.CType='textmedia', tt_content.assets=tt_content.image, tt_content.image=0, sys_file_reference.fieldname='assets' WHERE tt_content.CType='textpic' OR tt_content.CType='image';
UPDATE be_groups SET explicit_allowdeny=CONCAT(explicit_allowdeny,',tt_content:CType:textmedia:ALLOW') WHERE (explicit_allowdeny LIKE '%tt\\_content:CType:textpic:ALLOW%' OR explicit_allowdeny LIKE '%tt\\_content:CType:image:ALLOW%' OR explicit_allowdeny LIKE '%tt\\_content:CType:text:ALLOW%') AND explicit_allowdeny NOT LIKE '%tt\\_content:CType:textmedia:ALLOW%';
UPDATE be_groups SET explicit_allowdeny=CONCAT(explicit_allowdeny,',tt_content:CType:textmedia:DENY') WHERE (explicit_allowdeny LIKE '%tt\\_content:CType:textpic:DENY%' OR explicit_allowdeny LIKE '%tt\\_content:CType:image:DENY%' OR explicit_allowdeny LIKE '%tt\\_content:CType:text:DENY%') AND explicit_allowdeny NOT LIKE '%tt\\_content:CType:textmedia:DENY%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment