Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

djangocms_link/djangocms_picture to djangocms_frontend migration #184

Open
aacimov opened this issue Jan 25, 2024 · 4 comments
Open

djangocms_link/djangocms_picture to djangocms_frontend migration #184

aacimov opened this issue Jan 25, 2024 · 4 comments

Comments

@aacimov
Copy link

aacimov commented Jan 25, 2024

Is there a chance there will be a migration script for djangocms_link and djangocms_picture plugins which are, by my honest opinion, most used on lots of Django CMS based websites?

At the moment I am in a process of migrating the old Django CMS v3 with mentioned plugins (amongst others) and it would be a great option to migrate those to djangocms_frontend by ease. I must point out there is lots of data in the database I am migrating and only these 2 give me headache.

If not, are there any simple steps to transfer it easily (preferably with example)?

Thanks a lot!

@fsbraun
Copy link
Member

fsbraun commented Jan 25, 2024

Currently, there is no migration script for Link and/or picture plugins. However, it may not be difficult to create them: https://djangocms-frontend.readthedocs.io/en/latest/how-to/migrate-3rd-party-plugins.html The only difficulty I see, is that djangocms-link and djangocms-frontend use the same name for the link plugin. For the migration process the original link plugin might need to be renamed.

I'd suggest to look at:

Just be sure to make tests on a copied database first, where data loss would not matter.

Please let me know if I can assist with specific questions! This should be doable! 🚀

@aacimov
Copy link
Author

aacimov commented Jan 26, 2024

@fsbraun thanks!

I will definitely look into it. If I manage to do a migration process I will definitely share it.

Best regards.

@aacimov
Copy link
Author

aacimov commented Jan 26, 2024

Ok, I think I mapped the fields right but since bootstrap4_migration.pyis a subcommand it would be very helpful to point me in the right direction on how to do it as a standalone (single) command. Just a general bootstrapping of the command itself since there are lots of different methods in different files and it is giving me a hard time switching from different files "catching" the logic. I am afraid I could miss something.

I am working in a test environment of course, but still it would be very helpful.

@fsbraun
Copy link
Member

fsbraun commented Jan 26, 2024

Hi @aacimov !

If you have a mapping, put it into a file and in your settings.py set

DJANGOCMS_FRONTEND_ADDITIONAL_MIGRATIONS = ["dotted.path.to.your.migration.mapping"]

Run manage frontend migrate and see if it works.
If you do not want the djangocms-bootzstrap4 migrations to run, remove "djangocms_bootstrap4" from you INSTALLED_APPS and they will stay unaffected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants