TYPO3 数据库从流体内容迁移到通量
TYPO3 Database migration from fluidcontent to flux
我想通过删除过时的流体内容从流体内容切换到助焊剂。
如此处所述https://github.com/FluidTYPO3/fluidcontent/issues/424、
您必须将 tt_content table 中所有流体内容对象的 CType 从 fluidcontent_content
更改为 extensionnamewithoutunderscores_templatenamewithoutunderscores
。
是否有可用的迁移脚本或 SQL 语句?
没有下划线的table名称是文件名。为什么以及在哪里需要 flux:form
的 ID?
如链接页面所述:
您将需要一些查询(针对您定义的每个 CE),例如
UPDATE tt_content
SET CType = 'myextension_button'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'Vendor.MyExtension:Button.html'
您可能需要使用过的 CE 列表(计数和忽略已删除和隐藏):
SELECT tx_fed_fcefile,count(*)
FROM tt_content
WHERE CType = 'fluidcontent_content'
GROUP BY tx_fed_fcefile
一位同事发表了 SQL 声明,将所有流体含量 CType 转换为正确的通量值:
UPDATE tt_content
SET CType = LOWER(REPLACE(REPLACE(tx_fed_fcefile, 'YourNamespace.YourExtension:', 'flux_'), '.html', ''))
WHERE CType = 'fluidcontent_content';
你只需要改变YourNamespace.YourExtension
。您可以在 tx_fed_fcefile 行中找到 YourNamespace.YourExtension
的正确措辞。
出于某些原因,我不得不将 CType 替换为 flux_templatenamewithoutunderscores
而不是 extensionnamewithoutunderscores_templatenamewithoutunderscores
@kimomat 的查询其实很好。
我只是添加了一些香料,以防您有多个提供商扩展 installed/used.
UPDATE tt_content
SET CType = LOWER(REPLACE(REPLACE(tx_fed_fcefile, 'YourNamespace.YourExtension:', 'extensionnamewithoutunderscores_'), '.html', ''))
WHERE CType = 'fluidcontent_content' AND `tx_fed_fcefile` LIKE 'YourNamespace.YourExtension%';
- 运行 每个提供商扩展的查询。
- 用于
YourNamespace.YourExtension
的内容也可以从您的提供商扩展的 ext_localconf.php
文件中获取。
- 例如,如果我的分机的 name/key 是 my_provider,那么
extensionnamewithoutunderscores_
将是 myprovider_
可以在此处找到有关如何进行流体含量到助焊剂迁移的完整工作文章。
https://sigalambigha.home.blog/2020/04/29/how-to-migrate-fluidcontent-to-flux/
这不是一个独特的答案,但它可能对大家有一个特定的应用程序在特定情况下的外观有所帮助。在这种情况下,它是 Flux
和站点上使用 fluidbootstraptheme
.
的其他扩展的升级
首先检查需要更新的内容。
我运行这个SQL在PhpMyAdmin
SELECT tx_fed_fcefile,count(*)
FROM tt_content
WHERE CType = 'fluidcontent_content'
GROUP BY tx_fed_fcefile
对于我的特定网站,这导致...
进行必要的数据库更新
现在 运行 数据库中的这些 SQL 语句修复了每一个需要更新的东西...
UPDATE tt_content
SET CType = 'fluidbootstraptheme_button'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Button.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_carousel'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Carousel.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_embedvideo'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:EmbedVideo.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_imagegallery'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ImageGallery.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_modallight'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ModalLight.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_pageheader'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:PageHeader.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_row'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Row.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_simpleresponsiveimage'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:SimpleResponsiveImage.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_tabs'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Tabs.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_threecolumn'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ThreeColumn.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_thumbnailbox'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ThumbnailBox.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_twocolumn'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:TwoColumn.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_well'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Well.html'
UPDATE tt_content
SET CType = 'netchd_mycontentelement'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'rapidfyre_netchd:MyContentElement.html'
如果更新到 Flux
> 6 不要忘记 运行 Flux
升级脚本
在执行上述 SQL 更新后,某些内容仍未显示在 ThreeColumns
和其他 fluidbootstraptheme
具有嵌套内容的内容元素中。所以我去了后端的扩展和 运行 flux 中的更新脚本,它似乎修复了它......结果是
tt_content:713 on page 1 has new colPos 27502
tt_content:599 on page 1 has new colPos 27502
tt_content:612 on page 1 has new colPos 27502
tt_content:167 on page 38 has new colPos 22001
tt_content:168 on page 38 has new colPos 22002
tt_content:169 on page 38 has new colPos 22002
tt_content:417 on page 1 has new colPos 41500
tt_content:276 on page 1 has new colPos 27503
tt_content:264 on page 1 has new colPos 27502
tt_content:277 on page 166 has new colPos 28501
tt_content:286 on page 166 has new colPos 28502
tt_content:288 on page 166 has new colPos 28502
tt_content:289 on page 166 has new colPos 28502
tt_content:294 on page 173 has new colPos 32701
tt_content:328 on page 173 has new colPos 32701
tt_content:330 on page 1 has new colPos 27501
tt_content:300 on page 166 has new colPos 28502
tt_content:313 on page 17 has new colPos 31201
tt_content:314 on page 17 has new colPos 31202
tt_content:315 on page 17 has new colPos 31203
tt_content:326 on page 1 has new colPos 27501
tt_content:329 on page 173 has new colPos 32702
tt_content:341 on page 1 has new colPos 27503
tt_content:333 on page 173 has new colPos 32702
tt_content:337 on page 186 has new colPos 33602
tt_content:334 on page 186 has new colPos 33601
tt_content:338 on page 186 has new colPos 33602
tt_content:339 on page 186 has new colPos 33602
tt_content:354 on page 1 has new colPos 27502
tt_content:358 on page 1 has new colPos 27503
tt_content:387 on page 1 has new colPos 27503
tt_content:360 on page 1 has new colPos 27503
tt_content:388 on page 1 has new colPos 27503
tt_content:699 on page 1 has new colPos 27503
tt_content:698 on page 1 has new colPos 27503
tt_content:487 on page 1 has new colPos 27502
tt_content:371 on page 1 has new colPos 27502
tt_content:372 on page 1 has new colPos 27502
tt_content:392 on page 1 has new colPos 27503
tt_content:386 on page 1 has new colPos 27503
tt_content:436 on page 1 has new colPos 27503
tt_content:389 on page 1 has new colPos 27503
tt_content:397 on page 1 has new colPos 27503
tt_content:398 on page 1 has new colPos 27503
tt_content:414 on page 1 has new colPos 41500
tt_content:415 on page 1 has new colPos 27503
tt_content:416 on page 1 has new colPos 41500
tt_content:418 on page 1 has new colPos 41500
tt_content:419 on page 1 has new colPos 41500
tt_content:430 on page 1 has new colPos 41500
tt_content:435 on page 1 has new colPos 27502
tt_content:438 on page 1 has new colPos 27503
tt_content:437 on page 1 has new colPos 27503
tt_content:441 on page 1 has new colPos 27502
tt_content:457 on page 1 has new colPos 27503
tt_content:595 on page 1 has new colPos 27503
tt_content:479 on page 1 has new colPos 27503
tt_content:484 on page 1 has new colPos 27502
tt_content:480 on page 1 has new colPos 27502
tt_content:483 on page 1 has new colPos 27502
tt_content:495 on page 1 has new colPos 27503
tt_content:526 on page 230 has new colPos 52802
tt_content:529 on page 230 has new colPos 52801
tt_content:536 on page 1 has new colPos 27502
tt_content:545 on page 1 has new colPos 27502
tt_content:567 on page 1 has new colPos 27502
tt_content:594 on page 1 has new colPos 27503
tt_content:546 on page 1 has new colPos 27502
tt_content:568 on page 1 has new colPos 27502
tt_content:569 on page 1 has new colPos 27502
tt_content:578 on page 1 has new colPos 27502
tt_content:583 on page 1 has new colPos 27502
tt_content:584 on page 1 has new colPos 27502
tt_content:590 on page 1 has new colPos 27502
tt_content:593 on page 1 has new colPos 27502
tt_content:597 on page 1 has new colPos 27503
tt_content:598 on page 1 has new colPos 27502
tt_content:600 on page 1 has new colPos 27503
tt_content:609 on page 1 has new colPos 27503
tt_content:601 on page 250 has new colPos 60401
tt_content:602 on page 250 has new colPos 60401
tt_content:603 on page 250 has new colPos 60402
tt_content:607 on page 250 has new colPos 60402
tt_content:608 on page 250 has new colPos 60402
tt_content:610 on page 1 has new colPos 27502
tt_content:620 on page 1 has new colPos 27503
tt_content:628 on page 252 has new colPos 62701
tt_content:631 on page 252 has new colPos 62702
tt_content:636 on page 252 has new colPos 62702
tt_content:638 on page 1 has new colPos 27503
tt_content:643 on page 253 has new colPos 64102
tt_content:647 on page 253 has new colPos 64601
tt_content:648 on page 253 has new colPos 64602
tt_content:649 on page 253 has new colPos 64101
tt_content:654 on page 139 has new colPos 65301
tt_content:655 on page 139 has new colPos 65302
tt_content:670 on page 1 has new colPos 27503
tt_content:697 on page 1 has new colPos 27503
tt_content:689 on page 240 has new colPos 68802
tt_content:690 on page 240 has new colPos 68801
tt_content:691 on page 240 has new colPos 68803
tt_content:700 on page 1 has new colPos 27503
tt_content:711 on page 1 has new colPos 27502
tt_content:712 on page 1 has new colPos 27502
tt_content:714 on page 1 has new colPos 27502
我想通过删除过时的流体内容从流体内容切换到助焊剂。 如此处所述https://github.com/FluidTYPO3/fluidcontent/issues/424、
您必须将 tt_content table 中所有流体内容对象的 CType 从 fluidcontent_content
更改为 extensionnamewithoutunderscores_templatenamewithoutunderscores
。
是否有可用的迁移脚本或 SQL 语句?
没有下划线的table名称是文件名。为什么以及在哪里需要 flux:form
的 ID?
如链接页面所述:
您将需要一些查询(针对您定义的每个 CE),例如
UPDATE tt_content
SET CType = 'myextension_button'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'Vendor.MyExtension:Button.html'
您可能需要使用过的 CE 列表(计数和忽略已删除和隐藏):
SELECT tx_fed_fcefile,count(*)
FROM tt_content
WHERE CType = 'fluidcontent_content'
GROUP BY tx_fed_fcefile
一位同事发表了 SQL 声明,将所有流体含量 CType 转换为正确的通量值:
UPDATE tt_content
SET CType = LOWER(REPLACE(REPLACE(tx_fed_fcefile, 'YourNamespace.YourExtension:', 'flux_'), '.html', ''))
WHERE CType = 'fluidcontent_content';
你只需要改变YourNamespace.YourExtension
。您可以在 tx_fed_fcefile 行中找到 YourNamespace.YourExtension
的正确措辞。
出于某些原因,我不得不将 CType 替换为 flux_templatenamewithoutunderscores
而不是 extensionnamewithoutunderscores_templatenamewithoutunderscores
@kimomat 的查询其实很好。 我只是添加了一些香料,以防您有多个提供商扩展 installed/used.
UPDATE tt_content
SET CType = LOWER(REPLACE(REPLACE(tx_fed_fcefile, 'YourNamespace.YourExtension:', 'extensionnamewithoutunderscores_'), '.html', ''))
WHERE CType = 'fluidcontent_content' AND `tx_fed_fcefile` LIKE 'YourNamespace.YourExtension%';
- 运行 每个提供商扩展的查询。
- 用于
YourNamespace.YourExtension
的内容也可以从您的提供商扩展的ext_localconf.php
文件中获取。 - 例如,如果我的分机的 name/key 是 my_provider,那么
extensionnamewithoutunderscores_
将是myprovider_
可以在此处找到有关如何进行流体含量到助焊剂迁移的完整工作文章。 https://sigalambigha.home.blog/2020/04/29/how-to-migrate-fluidcontent-to-flux/
这不是一个独特的答案,但它可能对大家有一个特定的应用程序在特定情况下的外观有所帮助。在这种情况下,它是 Flux
和站点上使用 fluidbootstraptheme
.
首先检查需要更新的内容。
我运行这个SQL在PhpMyAdmin
SELECT tx_fed_fcefile,count(*)
FROM tt_content
WHERE CType = 'fluidcontent_content'
GROUP BY tx_fed_fcefile
对于我的特定网站,这导致...
进行必要的数据库更新
现在 运行 数据库中的这些 SQL 语句修复了每一个需要更新的东西...
UPDATE tt_content
SET CType = 'fluidbootstraptheme_button'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Button.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_carousel'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Carousel.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_embedvideo'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:EmbedVideo.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_imagegallery'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ImageGallery.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_modallight'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ModalLight.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_pageheader'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:PageHeader.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_row'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Row.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_simpleresponsiveimage'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:SimpleResponsiveImage.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_tabs'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Tabs.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_threecolumn'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ThreeColumn.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_thumbnailbox'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ThumbnailBox.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_twocolumn'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:TwoColumn.html'
UPDATE tt_content
SET CType = 'fluidbootstraptheme_well'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Well.html'
UPDATE tt_content
SET CType = 'netchd_mycontentelement'
WHERE CType = 'fluidcontent_content'
AND tx_fed_fcefile = 'rapidfyre_netchd:MyContentElement.html'
如果更新到 Flux
> 6 不要忘记 运行 Flux
升级脚本
在执行上述 SQL 更新后,某些内容仍未显示在 ThreeColumns
和其他 fluidbootstraptheme
具有嵌套内容的内容元素中。所以我去了后端的扩展和 运行 flux 中的更新脚本,它似乎修复了它......结果是
tt_content:713 on page 1 has new colPos 27502
tt_content:599 on page 1 has new colPos 27502
tt_content:612 on page 1 has new colPos 27502
tt_content:167 on page 38 has new colPos 22001
tt_content:168 on page 38 has new colPos 22002
tt_content:169 on page 38 has new colPos 22002
tt_content:417 on page 1 has new colPos 41500
tt_content:276 on page 1 has new colPos 27503
tt_content:264 on page 1 has new colPos 27502
tt_content:277 on page 166 has new colPos 28501
tt_content:286 on page 166 has new colPos 28502
tt_content:288 on page 166 has new colPos 28502
tt_content:289 on page 166 has new colPos 28502
tt_content:294 on page 173 has new colPos 32701
tt_content:328 on page 173 has new colPos 32701
tt_content:330 on page 1 has new colPos 27501
tt_content:300 on page 166 has new colPos 28502
tt_content:313 on page 17 has new colPos 31201
tt_content:314 on page 17 has new colPos 31202
tt_content:315 on page 17 has new colPos 31203
tt_content:326 on page 1 has new colPos 27501
tt_content:329 on page 173 has new colPos 32702
tt_content:341 on page 1 has new colPos 27503
tt_content:333 on page 173 has new colPos 32702
tt_content:337 on page 186 has new colPos 33602
tt_content:334 on page 186 has new colPos 33601
tt_content:338 on page 186 has new colPos 33602
tt_content:339 on page 186 has new colPos 33602
tt_content:354 on page 1 has new colPos 27502
tt_content:358 on page 1 has new colPos 27503
tt_content:387 on page 1 has new colPos 27503
tt_content:360 on page 1 has new colPos 27503
tt_content:388 on page 1 has new colPos 27503
tt_content:699 on page 1 has new colPos 27503
tt_content:698 on page 1 has new colPos 27503
tt_content:487 on page 1 has new colPos 27502
tt_content:371 on page 1 has new colPos 27502
tt_content:372 on page 1 has new colPos 27502
tt_content:392 on page 1 has new colPos 27503
tt_content:386 on page 1 has new colPos 27503
tt_content:436 on page 1 has new colPos 27503
tt_content:389 on page 1 has new colPos 27503
tt_content:397 on page 1 has new colPos 27503
tt_content:398 on page 1 has new colPos 27503
tt_content:414 on page 1 has new colPos 41500
tt_content:415 on page 1 has new colPos 27503
tt_content:416 on page 1 has new colPos 41500
tt_content:418 on page 1 has new colPos 41500
tt_content:419 on page 1 has new colPos 41500
tt_content:430 on page 1 has new colPos 41500
tt_content:435 on page 1 has new colPos 27502
tt_content:438 on page 1 has new colPos 27503
tt_content:437 on page 1 has new colPos 27503
tt_content:441 on page 1 has new colPos 27502
tt_content:457 on page 1 has new colPos 27503
tt_content:595 on page 1 has new colPos 27503
tt_content:479 on page 1 has new colPos 27503
tt_content:484 on page 1 has new colPos 27502
tt_content:480 on page 1 has new colPos 27502
tt_content:483 on page 1 has new colPos 27502
tt_content:495 on page 1 has new colPos 27503
tt_content:526 on page 230 has new colPos 52802
tt_content:529 on page 230 has new colPos 52801
tt_content:536 on page 1 has new colPos 27502
tt_content:545 on page 1 has new colPos 27502
tt_content:567 on page 1 has new colPos 27502
tt_content:594 on page 1 has new colPos 27503
tt_content:546 on page 1 has new colPos 27502
tt_content:568 on page 1 has new colPos 27502
tt_content:569 on page 1 has new colPos 27502
tt_content:578 on page 1 has new colPos 27502
tt_content:583 on page 1 has new colPos 27502
tt_content:584 on page 1 has new colPos 27502
tt_content:590 on page 1 has new colPos 27502
tt_content:593 on page 1 has new colPos 27502
tt_content:597 on page 1 has new colPos 27503
tt_content:598 on page 1 has new colPos 27502
tt_content:600 on page 1 has new colPos 27503
tt_content:609 on page 1 has new colPos 27503
tt_content:601 on page 250 has new colPos 60401
tt_content:602 on page 250 has new colPos 60401
tt_content:603 on page 250 has new colPos 60402
tt_content:607 on page 250 has new colPos 60402
tt_content:608 on page 250 has new colPos 60402
tt_content:610 on page 1 has new colPos 27502
tt_content:620 on page 1 has new colPos 27503
tt_content:628 on page 252 has new colPos 62701
tt_content:631 on page 252 has new colPos 62702
tt_content:636 on page 252 has new colPos 62702
tt_content:638 on page 1 has new colPos 27503
tt_content:643 on page 253 has new colPos 64102
tt_content:647 on page 253 has new colPos 64601
tt_content:648 on page 253 has new colPos 64602
tt_content:649 on page 253 has new colPos 64101
tt_content:654 on page 139 has new colPos 65301
tt_content:655 on page 139 has new colPos 65302
tt_content:670 on page 1 has new colPos 27503
tt_content:697 on page 1 has new colPos 27503
tt_content:689 on page 240 has new colPos 68802
tt_content:690 on page 240 has new colPos 68801
tt_content:691 on page 240 has new colPos 68803
tt_content:700 on page 1 has new colPos 27503
tt_content:711 on page 1 has new colPos 27502
tt_content:712 on page 1 has new colPos 27502
tt_content:714 on page 1 has new colPos 27502