I would like to include some PostgreSQL functions as part of the database migration.
The two ways I can see are:
- Editing the migrations file (generated by
python manage.py makemigrations) - Hooking post table creation
The first seems easier, but laborious if the migration needs to be remade. What would you recommend the best way to go about it?
makemigrations, usually. But nothing stops you from adding your own migration (see here) with your ownRunSQLcommands, which will just be run as any other migration.