Skip to content

Internal references creation

David Larlet requested to merge 189-internal-references into preprod

The evolution of the current model is necessary to be able to attach a creator to the relation given our permission system (creators can delete their creations).

I was not able to reuse the previous table without getting hit by Django's migrations system, hence the dedicated script to migrate the data and assign existing internal references relations to the admin_ap user.

Deployment procedure

$ python django/manage.py migrate
$ python django/manage.py shell_plus
>>> PassageInternalReference.objects.all().count()
806

Once we are sure that new objects exist, we can safely drop the old table:

$ psql --username "$POSTGRES_USER" --dbname "$POSTGRES_DB"
=> DROP TABLE "meleager_passage_internal_references";

Closes #189 (closed)

Edited by David Larlet

Merge request reports