Replace the FK towards Document on OcrModel by a M2M relation
Compare changes
- Eva Bardou authored
+ 6
− 1
@@ -18,9 +18,13 @@ class MetadataInline(admin.TabularInline):
@@ -43,6 +47,7 @@ class ScriptAdmin(admin.ModelAdmin):
Closes #353 (closed)
This MR implements the refactoring of the OcrModel.document
ForeignKey into a ManyToMany relation towards Document
instances:
0045
) to implement the M2M relation aswell as the OcrModelDocument
M2M "through" model. Note that this migration also uses a RunPython
function to migrate existing OcrModel.document
links to match the new schema.OcrModelDocument
) and added some inlines on Document
and OcrModel
to easily browse relations.