You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using wagtail-docker-develop and on the latest main I am having trouble re-syncing the database with the initial data.
Steps to reproduce
Run docker make start
SSH into bakerydemo make ssh
In the SSH session run the migrate ./manage.py migrate
Then run the initial data loading ./manage.py load_initial_data
django.db.utils.IntegrityError: Problem installing fixture '/code/bakerydemo/bakerydemo/base/fixtures/bakerydemo.json': Could not load wagtailsearchpromotions.SearchPromotion(pk=3): null value in column "external_link" violates not-null constraint
Docker output.
db | 2023-09-12 21:06:33.707 UTC [31] ERROR: null value in column "external_link" violates not-null constraint
db | 2023-09-12 21:06:33.707 UTC [31] DETAIL: Failing row contains (3, 0, , 36, 5, null, null).
db | 2023-09-12 21:06:33.707 UTC [31] STATEMENT: INSERT INTO "wagtailsearchpromotions_searchpromotion" ("id", "query_id", "page_id", "sort_order", "description") VALUES (3, 5, 36, 0, '') RETURNING "wagtailsearchpromotions_searchpromotion"."id"
Note that this is on an existing docker image, not sure if that will cause issues.
When I try to flush the DB I get a different error
root@3ed86aae1d34:/code/bakerydemo# python manage.py flush
You have requested a flush of the database.
This will IRREVERSIBLY DESTROY all data currently in the "wagtail" database,
and return each table to an empty state.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
CommandError: Database wagtail couldn't be flushed. Possible reasons:
* The database isn't running or isn't configured correctly.
* At least one of the expected database tables doesn't exist.
* The SQL was invalid.
Hint: Look at the output of 'django-admin sqlflush'. That's the SQL this command wasn't able to run.
Maybe this issue should move to the Wagtail docker repo instead?
The text was updated successfully, but these errors were encountered:
I am using wagtail-docker-develop and on the latest
main
I am having trouble re-syncing the database with the initial data.Steps to reproduce
make start
make ssh
./manage.py migrate
./manage.py load_initial_data
Docker output.
Note that this is on an existing docker image, not sure if that will cause issues.
When I try to flush the DB I get a different error
Maybe this issue should move to the Wagtail docker repo instead?
The text was updated successfully, but these errors were encountered: