You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading an existing project from djangocms-text-ckeditor to djangocms-text, I'm unable to delete text plugins or publish CMS pages containing text plugins. The problem seems to be that the djangocms_text_ckeditor_text table still exists in the database, which has a foreign key to the cms_cmsplugin table.
We didn't encounter this problem during development, as we use sqlite there which doesn't enforce foreign keys by default. On our production environment however, we use PostgreSQL, which does enforce this.
As suggested by @fsbraun in Discord, the straightforward solution seems to be dropping the djangocms_text_ckeditor_text table after upgrading. This should probably be mentioned in the upgrade steps in the readme :)
The text was updated successfully, but these errors were encountered:
@fsbraun I was thinking of creating a new migration file to handle the table cleanup automatically and then updating the readme to explicitly mention this:
djangocms-text's migrations automatically migrate existing text plugins
from djangocms-text-ckeditor and clean up old tables. All you have to do is:
* uninstall ``djangocms-text-ckeditor``
* remove ``djangocms_text_ckeditor`` from ``INSTALLED_APPS``
* add ``djangocms_text`` to ``INSTALLED_APPS`` (see above)
* run ``python -m manage migrate djangocms_text``
I'm not sure if we want to automatically do this which is why I wanted to run it by you first.
After upgrading an existing project from
djangocms-text-ckeditor
todjangocms-text
, I'm unable to delete text plugins or publish CMS pages containing text plugins. The problem seems to be that thedjangocms_text_ckeditor_text
table still exists in the database, which has a foreign key to thecms_cmsplugin
table.We didn't encounter this problem during development, as we use sqlite there which doesn't enforce foreign keys by default. On our production environment however, we use PostgreSQL, which does enforce this.
As suggested by @fsbraun in Discord, the straightforward solution seems to be dropping the
djangocms_text_ckeditor_text
table after upgrading. This should probably be mentioned in the upgrade steps in the readme :)The text was updated successfully, but these errors were encountered: