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

Update fixtures with field entities #277

Merged
merged 2 commits into from Feb 16, 2024

Conversation

SibiAkkash
Copy link
Contributor

i've dumped that data with the latest migrations.

python manage.py dumpdata --exclude=contenttypes > server/fixtures/sample_data.json

@Joe2k: can you check if loading this fixture works and merge ?

@punchagan
Copy link
Member

We have a script scripts/update-sample-data.sh. Is there a reason that you didn't use that? :)

@SibiAkkash
Copy link
Contributor Author

SibiAkkash commented Feb 16, 2024

Oh i didn't see that script ;) I'll use that
I got a contenttypes Integrity error when i tried dumping data directly, so i excluded that and it seemed to work
@punchagan

@punchagan
Copy link
Member

May be use an empty DB and try to see if the load works, and allows a new dev to start working with the dumped DB? If you can share the full error, we can dig into it.

@SibiAkkash
Copy link
Contributor Author

yeah i did try in an empty db, i'll share the errors

@SibiAkkash
Copy link
Contributor Author

Commands i ran

./scripts/update-sample-data.sh

rm db.sqlite3
python manage.py migrate
python manage.py loaddata server/fixtures/sample_data.json

error:
django.db.utils.IntegrityError: Problem installing fixture '/home/sibi/dev/india_ultimate_hub/server/fixtures/sample_data.json': Could not load contenttypes.ContentType(pk=25): UNIQUE constraint failed: django_content_type.app_label, django_content_type.model

@punchagan punchagan merged commit 2210ba5 into india-ultimate:main Feb 16, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants