Repository navigation
Unable to create migrations #652
Description
Activity
The instructions around migrations are lacking. I'm not sure why, but you have to create the module referenced in
MIGRATION_MODULESyourself, so:mkdir -p myapp/migrate/page touch myapp/migrate/__init__.py myapp/migrate/page/__init__.pyAfter these steps, the initial
./manage.py makemigrations pageand subsequent./manage.py migratecalls should actually do something.The instructions didn't mention anything about creating a /page subdirectory within the /migrate directory. I believe they should be updated to reflect this.
After creating a /page subdirectory (and a /medialibrary subdirectory, which also seems to be necessary to get those instructions to work) and populating them with empty __init__.py files I was able to create migrations for the page and medialibrary apps, however those migrations still aren't being applied when I run the django-admin migrate command and I'm still getting the same error in the admin. Are there additional steps I need to perform?
That's very strange. This is the first time I hear that migrations can be created, but not applied. Does specifying the app help, something like
./manage.py migrate medialibrary?I've already tried that. It says that there are no migrations to apply.
It looks like the problem was that the migrations were created (somewhere) and run during one of my previous attempts to fix this issue so Django didn't recognize the newly-created migrations as still needing to be applied. When I undid the previous migrations (which I was able to do using a
migrate medialibrary zerocommand for medialibrary but which I needed to do manually on the database after--fake-ing the zero-migration for page) the new ones were able to be applied and the admin now works.I would strongly advise updating the documentation for this app; setting up a simple "Hello World" application shouldn't be this much of a minefield.
That's absolutely true, also, it just came up again in #658...
I'm attempting to set up a simple "Hello World" app using FeinCMS, however when I try to access the "Page" section of the admin after following the instructions in the "Built-In Page Module" section in the ReadTheDocs documentation I get an error stating "column page_page.publication_date does not exist". It appears that I need to run some migrations in order to get FeinCMS to function, but the software has none built-in.
The documentation does contain a section on setting up migrations yourself, however when I try to follow the instructions there I get an ImportError exception stating "No module named 'myapp.migrate.page'" when I try to run the server (with "myapp" being replaced by the name of the application I'm trying to set up.) Is there any way to resolve this?