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

byro "Migrate" warnings #244

Closed
spaetz opened this issue Feb 15, 2022 · 3 comments
Closed

byro "Migrate" warnings #244

spaetz opened this issue Feb 15, 2022 · 3 comments

Comments

@spaetz
Copy link

spaetz commented Feb 15, 2022

Hi, I have been installing byro 0.0.2 (current git) and it seems to run fine. Thanks! When issueing "./manage.py migrate" I get a bunch of warnings from django though, which perhaps should be solved. I am not deep enough in the code yet, to provide a merge request, but will be happy to provide one, if the fix is as trivial as the HINT suggests.

bookkeeping.Account: (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 BookkeepingConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.

	HINT: Configure the DEFAULT_AUTO_FIELD setting or the CommonConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
common.LogEntry: (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 DocumentsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
mails.EMail: (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 MailsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
mails.MailTemplate: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.

@spaetz
Copy link
Author

spaetz commented Feb 15, 2022

P.S. and I have not yet found out when it is being logged, but after a "manage.py" migrate & createsuperuse & makemessages --all, my log contains:

    return self.cursor.execute(sql, params)
  File "/var/www/vhosts/hosting169198.ae858.netcup.net/httpdocs/ff2931.sspaeth.de/lib/lib/python3.7/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/var/www/vhosts/hosting169198.ae858.netcup.net/httpdocs/ff2931.sspaeth.de/lib/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/var/www/vhosts/hosting169198.ae858.netcup.net/httpdocs/ff2931.sspaeth.de/lib/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: common_configuration

But that is certainly a different issue.

@rixx rixx changed the title byro "Migrate" errors byro "Migrate" warnings Feb 15, 2022
@rixx
Copy link
Member

rixx commented Feb 15, 2022

Please open separate issues for separate problems! Though your last one sounds like you haven't executed all migrations, or not successfully, or are connected to a different db/different environment.

@rixx
Copy link
Member

rixx commented Feb 15, 2022

There really isn't any need to do anything, as the log entries you saw are not errors, just notices that django is assuming a well-defined default value. But I'll push a change to avoid future confusion.

@rixx rixx closed this as completed in 79d31c1 Feb 15, 2022
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

2 participants