Closed thomas-frantz closed 8 years ago
Good find! I forgot to update the Ansible scripts as I upgraded the Django version - the migration process is a little different now. I'll publish a patch within the next few days. For now you can try to run the database migrations manually: https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-migrate
Hey, thanks!
I'll try that and report.
So, I had actually tried doing doing it manually. Though, I don't have much experience with python or django, so I'm not quite sure what the format of the command should be.
I've tried:
./manage.py migrate eve_db
which results in:
(element43)~element43/element43/webapp (master ✘)✹✭ ᐅ ./manage.py migrate eve_db
Operations to perform:
Apply all migrations: eve_db
Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
As well as:
./manage.py migrate eve_db apps.common
which results in:
CommandError: Cannot find a migration matching 'apps.common' from app 'eve_db'.
And
./manage.py migrate apps.common
Which results in the same error above.
I've tried
./manage.py makemigrations
Which results in:
(element43)~element43/element43/webapp (master ✘)✹✭ ᐅ ./manage.py makemigrations
Migrations for 'eve_db':
0004_auto_20151128_2052.py:
- Change Meta options on invuniquename
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/core/management/commands/makemigrations.py", line 143, in handle
self.write_migration_files(changes)
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/core/management/commands/makemigrations.py", line 172, in write_migration_files
with open(writer.path, "wb") as fh:
IOError: [Errno 13] Permission denied: u'/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/eve_db/migrations/0004_auto_20151128_2052.py'
So, not quite sure what the command should be.
edit:
Also tried:
(element43)~element43/element43/webapp (master ✘)✹✭ ᐅ django-admin migrate apps.common
Traceback (most recent call last):
File "/home/element43/virtualenvs/element43/bin/django-admin", line 11, in <module>
sys.exit(execute_from_command_line())
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 303, in execute
settings.INSTALLED_APPS
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
self._setup(name)
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "/home/element43/virtualenvs/element43/local/lib/python2.7/site-packages/django/conf/__init__.py", line 92, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named element43.settings.local
So, I got the django-admin command to work (I had to add /home/element43/element43/webapp to the PYTHONPATH). Now it's giving the same things as before when just running ./manage.py
Feel free to ask if you have any more questions.
Just wanted to let you know it worked flawlessly. Thanks!
Tried from a fresh VM provision, twice:
Only thing I've changed is in the vagrantfile, I changed the port forward to 8585 from 8080.
I'm running debian host (Hydrogen Linux, actually), with VirtualBox 5.0.10. The guest additions for 5.0.10 also failed to install for 5.0.10. I'll have to go hunt that error down if it's relevant.