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

Installation guide ends up to database error during migrate #314

Open
Postman76 opened this issue Mar 1, 2019 · 0 comments
Open

Installation guide ends up to database error during migrate #314

Postman76 opened this issue Mar 1, 2019 · 0 comments

Comments

@Postman76
Copy link

Hi

it looks that installation guide have some hickups whentrying to implement django-user-accounts to new project. Where it ends with quite many errors during the migrating process Here are error messages:

 python manage.py migrate
Operations to perform:
  Apply all migrations: account, admin, auth, contenttypes, sessions, sites, webui
Running migrations:
  Applying account.0002_fix_str...Traceback (most recent call last):
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\sqlite3\base.py", line 298, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: account_account

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 316, in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 353, in execute
    output = self.handle(*args, **options)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 83, in wrapped
    res = handle_func(*args, **kwargs)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\migrate.py", line 203, in handle
    fake_initial=fake_initial,
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrations\executor.py", line 117, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrations\executor.py", line 147, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrations\executor.py", line 244, in apply_migration
    state = migration.apply(state, schema_editor)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrations\migration.py", line 124, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\migrations\operations\fields.py", line 216, in database_forwards
    schema_editor.alter_field(from_model, from_field, to_field)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\sqlite3\schema.py", line 136, in alter_field
    super().alter_field(model, old_field, new_field, strict=strict)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\schema.py", line 523, in alter_field
    old_db_params, new_db_params, strict)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\sqlite3\schema.py", line 333, in _alter_field
    self._remake_table(model, alter_field=(old_field, new_field))
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\sqlite3\schema.py", line 263, in _remake_table
    disable_constraints=False,
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\sqlite3\schema.py", line 98, in alter_db_table
    super().alter_db_table(model, old_db_table, new_db_table)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\schema.py", line 397, in alter_db_table
    "new_table": self.quote_name(new_db_table),
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\schema.py", line 133, in execute
    cursor.execute(sql, params)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 100, in execute
    return super().execute(sql, params)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 68, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\sqlite3\base.py", line 298, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: account_account

Could you please update your guidance to include needed steps to make needed changes for sqllite databases as well?

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

1 participant