average-breakfast-91545
06/03/2023, 1:07 PMelf = <django.db.backends.utils.CursorWrapper object at 0x7f1f6d967970>
sql = 'ALTER TABLE "dz_user_groups" ADD CONSTRAINT "dz_user_groups_group_id_2e149f2f_fk_auth_group_id" FOREIGN KEY ("group_id") REFERENCES "auth_group" ("id") DEFERRABLE INITIALLY DEFERRED'
params = ()
ignored_wrapper_args = (False, {'connection': <django.db.backends.postgresql.base.DatabaseWrapper object at 0x7f1f6f5bce20>, 'cursor': <django.db.backends.utils.CursorWrapper object at 0x7f1f6d967970>})
def _execute(self, sql, params, *ignored_wrapper_args):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
if params is None:
# params default might be backend specific.
return self.cursor.execute(sql)
else:
> return self.cursor.execute(sql, params)
E django.db.utils.ProgrammingError: relation "auth_group" does not exist
My guess is that the migrations for django.contrib.auth
aren't running before it tries to apply our custom schema. If I run pants run .../manage.py -- migrate
then all migrations are applied. I've got string_imports
enabled, and have got the PANTS_EXECUTION_SLOT trick set up in a conftest. Pytest is creating a new DB per slot, and seems to be finding my migrations, but not applying auth, though it's sort of hard to tell in the absence of useful logs (thanks, django)
Edit: fixed, thanks for 🦆average-breakfast-91545
06/03/2023, 2:21 PMbitter-ability-32190
06/03/2023, 2:24 PMaverage-breakfast-91545
06/03/2023, 2:28 PMaverage-breakfast-91545
06/03/2023, 2:28 PMaverage-breakfast-91545
06/03/2023, 2:29 PMhappy-kitchen-89482
06/03/2023, 10:12 PMhappy-kitchen-89482
06/03/2023, 10:13 PMhappy-kitchen-89482
06/03/2023, 10:13 PMhappy-kitchen-89482
06/03/2023, 10:13 PMaverage-breakfast-91545
06/04/2023, 8:57 AMaverage-breakfast-91545
06/04/2023, 8:58 AM