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

Migration Error 🤖 #2

Open
yezz123 opened this issue Jun 6, 2021 · 0 comments
Open

Migration Error 🤖 #2

yezz123 opened this issue Jun 6, 2021 · 0 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@yezz123
Copy link
Member

yezz123 commented Jun 6, 2021

When I try to migrate to run the server I get this error

System check identified some issues:

WARNINGS:
checkout.Order: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
	HINT: Configure the DEFAULT_AUTO_FIELD setting or the CheckoutConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
checkout.OrderLineItem: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
	HINT: Configure the DEFAULT_AUTO_FIELD setting or the CheckoutConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
products.Product: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
	HINT: Configure the DEFAULT_AUTO_FIELD setting or the ProductsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
Traceback (most recent call last):
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 209, in get_new_connection
    conn = Database.connect(**conn_params)
sqlite3.OperationalError: unable to open database file

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

Traceback (most recent call last):
  File "manage.py", line 19, in <module>
    execute_from_command_line(sys.argv)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 92, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/migrations/loader.py", line 53, in __init__
    self.build_graph()
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/migrations/loader.py", line 220, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 77, in applied_migrations
    if self.has_table():
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 55, in has_table
    with self.connection.cursor() as cursor:
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 259, in cursor
    return self._cursor()
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 235, in _cursor
    self.ensure_connection()
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/django/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 209, in get_new_connection
    conn = Database.connect(**conn_params)
django.db.utils.OperationalError: unable to open database file
@yezz123 yezz123 added bug Something isn't working help wanted Extra attention is needed labels Jun 6, 2021
@yezz123 yezz123 self-assigned this Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant