<commit_before># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models


priorities = (
    #accept_case
    ('SPOP', 1),

    #alternative_help
    ('COSPF', 1),
    ('SPFN', 1),
    ('IRKB', 1),
    ('SPFM', 1),

    #assign_to_provider
    ('SPOR', 1),
    ('MANALC', 1),
    ('REFSP', 1),

    #callback
    ('CB1', 4),
    ('CB2', 3),
    ('CB3', 2),

    #close_case
    ('CLSP', 1),

    #decline_help
    ('DECL', 1),
    ('NRES', 1),
    ('DESP', 1),

    #defer_assignment
    ('CBSP', 1),

    #reject_case
    ('COI', 5),
    ('MIS', 6),
    ('MIS-OOS', 1),
    ('MIS-MEANS', 1),

    #split_case
    ('REF-EXT', 1),
    ('REF-INT', 1),

    #suspend_case
    ('TERM', 1),
    ('ABND', 1),
    ('IRCB', 7),
    ('INSUF', 1),
    ('CPTA', 1),
    ('NCOE', 1),
)

class Migration(DataMigration):

    def forwards(self, orm):
        "Write your forwards methods here."
        # Note: Don't use "from appname.models import ModelName".
        # Use orm.ModelName to refer to models in this application,
        # and orm['appname.ModelName'] for models in other applications.

        for code, priority in priorities:
            orm.OutcomeCodePriority(code=code, priority=priority).save()

    def backwards(self, orm):
        "Write your backwards methods here."

        for code, priority in priorities:
            orm.OutcomeCodePriority.objects.all().delete()

    models = {
        u'auth.group': {
            'Meta': {'object_name': 'Group'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),<commit_msg>Add initial outcome code priority data<commit_after># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models


priorities = (
    ('DEFAULT', 1),

    #callback
    ('CB1', 4),
    ('CB2', 3),
    ('CB3', 2),

    #reject_case
    ('COI', 5),
    ('MIS', 6),

    #suspend_case
    ('IRCB', 7),
)

class Migration(DataMigration):

    def forwards(self, orm):
        "Write your forwards methods here."
        # Note: Don't use "from appname.models import ModelName".
        # Use orm.ModelName to refer to models in this application,
        # and orm['appname.ModelName'] for models in other applications.

        for code, priority in priorities:
            orm.OutcomeCodePriority(code=code, priority=priority).save()

    def backwards(self, orm):
        "Write your backwards methods here."

        for code, priority in priorities:
            orm.OutcomeCodePriority.objects.all().delete()

    models = {
        u'auth.group': {
            'Meta': {'object_name': 'Group'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
{'fraction_non_alphanumeric': 0.16813581456088803, 'fraction_numerical': 0.015997388181521383, 'mean_word_length': 2.5920281359906214, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4266325', 'n_tokens_mistral': 1048, 'n_tokens_neox': 976, 'n_words': 269}