# Use Django Migration to create initial data

**URL:** <https://forum.djangoproject.com/t/use-django-migration-to-create-initial-data/24555>\
**Category:** Using the ORM\
**Created:** [October 16, 2023, 6:34pm UTC](https://forum.djangoproject.com/t/use-django-migration-to-create-initial-data/24555 "2023-10-16T18:34:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rocjojo](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/rocjojo/32/15813_2.png) [@rocjojo](https://forum.djangoproject.com/u/rocjojo)\
**Post date:** [October 16, 2023, 6:34pm UTC](https://forum.djangoproject.com/t/use-django-migration-to-create-initial-data/24555/1 "2023-10-16T18:34:21Z")

</div>

Hello,

In order to initialize a new project I need to create a hundred instances of a Django model (for example a hundred authors). I hesitate to use a data migration to apply this initial data creation on our different platforms.

However, I don’t know if it’s a good practice to create these instances with migrations because I’ll have to keep them “forever” in my application’s migrations folder.

Perhaps it would be better to create a Django command to apply “by hand” and then remove it from the git repo later?

Thanks for your advice and have a nice day.

Joel

---

<div class="post-metadata">

**Author:** ![antoinehumbert](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/antoinehumbert/32/14851_2.png) [@antoinehumbert](https://forum.djangoproject.com/u/antoinehumbert)\
**Post date:** [October 16, 2023, 7:22pm UTC](https://forum.djangoproject.com/t/use-django-migration-to-create-initial-data/24555/2 "2023-10-16T19:22:15Z")

</div>

You probably want to use a fixture for that. No need for creating a command.

See [Fixtures | Django documentation | Django](https://docs.djangoproject.com/en/4.2/topics/db/fixtures/)
