-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from archesproject/jmc/53_54_migrate_lingo_col…
…lections_and_graphs 53/54 Migrate lingo collections and graphs to use lists & reference datatype
- Loading branch information
Showing
8 changed files
with
91,660 additions
and
36,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
from django.db import migrations | ||
from django.core import management | ||
from arches_lingo.settings import APP_ROOT | ||
from arches_references.models import List, ListItem, ListItemValue | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("arches_lingo", "0001_initial"), | ||
("arches_references", "0004_require_controlledlistitem_uri"), | ||
] | ||
|
||
def load_lists(apps, schema_editor): | ||
management.call_command( | ||
"loaddata", | ||
os.path.join( | ||
APP_ROOT, | ||
"pkg", | ||
"reference_data", | ||
"controlled_lists", | ||
"lingo_lists.json", | ||
), | ||
) | ||
|
||
operations = [ | ||
migrations.RunPython(load_lists, migrations.RunPython.noop), | ||
] |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.