/docs/migrations.rst

http://github.com/feincms/feincms · ReStructuredText · 36 lines · 24 code · 12 blank · 0 comment · 0 complexity · 22ccc95a79d48b89b5e69057fd3f75cb MD5 · raw file

  1. .. _migrations:
  2. ======================================
  3. Database migration support for FeinCMS
  4. ======================================
  5. FeinCMS itself does not come with any migrations. It is recommended that you
  6. add migrations for FeinCMS models yourself inside your project.
  7. Django's builtin migrations
  8. ===========================
  9. This guide assumes that you are using both the page and the medialibrary
  10. module from FeinCMS. Simply leave out medialibrary if unused.
  11. * Create a new folder named ``migrate`` in your app with an empty
  12. ``__init__.py`` inside.
  13. * Add the following configuration to your ``settings.py``::
  14. MIGRATION_MODULES = {
  15. 'page': 'yourapp.migrate.page',
  16. 'medialibrary': 'yourapp.migrate.medialibrary',
  17. }
  18. .. warning::
  19. You **must not** use ``migrations`` as folder name for the FeinCMS
  20. migrations, otherwise Django **will** get confused.
  21. * Create initial migrations and apply them::
  22. ./manage.py makemigrations medialibrary
  23. ./manage.py makemigrations page
  24. ./manage.py migrate