# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-06-20 13:03
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='MdlCourse',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('category', models.BigIntegerField()),
                ('sortorder', models.BigIntegerField()),
                ('fullname', models.CharField(max_length=254)),
                ('shortname', models.CharField(max_length=255)),
                ('idnumber', models.CharField(max_length=100)),
                ('summary', models.TextField(blank=True, null=True)),
                ('summaryformat', models.SmallIntegerField()),
                ('format', models.CharField(max_length=21)),
                ('showgrades', models.SmallIntegerField()),
                ('newsitems', models.IntegerField()),
                ('startdate', models.BigIntegerField()),
                ('enddate', models.BigIntegerField()),
                ('marker', models.BigIntegerField()),
                ('maxbytes', models.BigIntegerField()),
                ('legacyfiles', models.SmallIntegerField()),
                ('showreports', models.SmallIntegerField()),
                ('visible', models.SmallIntegerField()),
                ('visibleold', models.SmallIntegerField()),
                ('groupmode', models.SmallIntegerField()),
                ('groupmodeforce', models.SmallIntegerField()),
                ('defaultgroupingid', models.BigIntegerField()),
                ('lang', models.CharField(max_length=30)),
                ('calendartype', models.CharField(max_length=30)),
                ('theme', models.CharField(max_length=50)),
                ('timecreated', models.BigIntegerField()),
                ('timemodified', models.BigIntegerField()),
                ('requested', models.SmallIntegerField()),
                ('enablecompletion', models.SmallIntegerField()),
                ('completionnotify', models.SmallIntegerField()),
                ('cacherev', models.BigIntegerField()),
            ],
            options={
                'db_table': 'mdl_course',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='MdlGradeGrades',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('rawgrade', models.DecimalField(blank=True, decimal_places=5, max_digits=10, null=True)),
                ('rawgrademax', models.DecimalField(decimal_places=5, max_digits=10)),
                ('rawgrademin', models.DecimalField(decimal_places=5, max_digits=10)),
                ('rawscaleid', models.BigIntegerField(blank=True, null=True)),
                ('usermodified', models.BigIntegerField(blank=True, null=True)),
                ('finalgrade', models.DecimalField(blank=True, decimal_places=5, max_digits=10, null=True)),
                ('hidden', models.BigIntegerField()),
                ('locked', models.BigIntegerField()),
                ('locktime', models.BigIntegerField()),
                ('exported', models.BigIntegerField()),
                ('overridden', models.BigIntegerField()),
                ('excluded', models.BigIntegerField()),
                ('feedback', models.TextField(blank=True, null=True)),
                ('feedbackformat', models.BigIntegerField()),
                ('information', models.TextField(blank=True, null=True)),
                ('informationformat', models.BigIntegerField()),
                ('timecreated', models.BigIntegerField(blank=True, null=True)),
                ('timemodified', models.BigIntegerField(blank=True, null=True)),
                ('aggregationstatus', models.CharField(max_length=10)),
                ('aggregationweight', models.DecimalField(blank=True, decimal_places=5, max_digits=10, null=True)),
            ],
            options={
                'db_table': 'mdl_grade_grades',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='MdlGradeItems',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('categoryid', models.BigIntegerField(blank=True, null=True)),
                ('itemname', models.CharField(blank=True, max_length=255, null=True)),
                ('itemtype', models.CharField(max_length=30)),
                ('itemmodule', models.CharField(blank=True, max_length=30, null=True)),
                ('iteminstance', models.BigIntegerField(blank=True, null=True)),
                ('itemnumber', models.BigIntegerField(blank=True, null=True)),
                ('iteminfo', models.TextField(blank=True, null=True)),
                ('idnumber', models.CharField(blank=True, max_length=255, null=True)),
                ('calculation', models.TextField(blank=True, null=True)),
                ('gradetype', models.SmallIntegerField()),
                ('grademax', models.DecimalField(decimal_places=5, max_digits=10)),
                ('grademin', models.DecimalField(decimal_places=5, max_digits=10)),
                ('scaleid', models.BigIntegerField(blank=True, null=True)),
                ('outcomeid', models.BigIntegerField(blank=True, null=True)),
                ('gradepass', models.DecimalField(decimal_places=5, max_digits=10)),
                ('multfactor', models.DecimalField(decimal_places=5, max_digits=10)),
                ('plusfactor', models.DecimalField(decimal_places=5, max_digits=10)),
                ('aggregationcoef', models.DecimalField(decimal_places=5, max_digits=10)),
                ('aggregationcoef2', models.DecimalField(decimal_places=5, max_digits=10)),
                ('sortorder', models.BigIntegerField()),
                ('display', models.BigIntegerField()),
                ('decimals', models.SmallIntegerField(blank=True, null=True)),
                ('hidden', models.BigIntegerField()),
                ('locked', models.BigIntegerField()),
                ('locktime', models.BigIntegerField()),
                ('needsupdate', models.BigIntegerField()),
                ('weightoverride', models.SmallIntegerField()),
                ('timecreated', models.BigIntegerField(blank=True, null=True)),
                ('timemodified', models.BigIntegerField(blank=True, null=True)),
                ('courseid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='moodle.MdlCourse')),
            ],
            options={
                'db_table': 'mdl_grade_items',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='MdlUser',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('auth', models.CharField(max_length=20)),
                ('confirmed', models.SmallIntegerField()),
                ('policyagreed', models.SmallIntegerField()),
                ('deleted', models.SmallIntegerField()),
                ('suspended', models.SmallIntegerField()),
                ('mnethostid', models.BigIntegerField()),
                ('username', models.CharField(max_length=100)),
                ('password', models.CharField(max_length=255)),
                ('idnumber', models.CharField(max_length=255)),
                ('firstname', models.CharField(max_length=100)),
                ('lastname', models.CharField(max_length=100)),
                ('email', models.CharField(max_length=100)),
                ('emailstop', models.SmallIntegerField()),
                ('icq', models.CharField(max_length=15)),
                ('skype', models.CharField(max_length=50)),
                ('yahoo', models.CharField(max_length=50)),
                ('aim', models.CharField(max_length=50)),
                ('msn', models.CharField(max_length=50)),
                ('phone1', models.CharField(max_length=20)),
                ('phone2', models.CharField(max_length=20)),
                ('institution', models.CharField(max_length=255)),
                ('department', models.CharField(max_length=255)),
                ('address', models.CharField(max_length=255)),
                ('city', models.CharField(max_length=120)),
                ('country', models.CharField(max_length=2)),
                ('lang', models.CharField(max_length=30)),
                ('calendartype', models.CharField(max_length=30)),
                ('theme', models.CharField(max_length=50)),
                ('timezone', models.CharField(max_length=100)),
                ('firstaccess', models.BigIntegerField()),
                ('lastaccess', models.BigIntegerField()),
                ('lastlogin', models.BigIntegerField()),
                ('currentlogin', models.BigIntegerField()),
                ('lastip', models.CharField(max_length=45)),
                ('secret', models.CharField(max_length=15)),
                ('picture', models.BigIntegerField()),
                ('url', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True, null=True)),
                ('descriptionformat', models.SmallIntegerField()),
                ('mailformat', models.SmallIntegerField()),
                ('maildigest', models.SmallIntegerField()),
                ('maildisplay', models.SmallIntegerField()),
                ('autosubscribe', models.SmallIntegerField()),
                ('trackforums', models.SmallIntegerField()),
                ('timecreated', models.BigIntegerField()),
                ('timemodified', models.BigIntegerField()),
                ('trustbitmask', models.BigIntegerField()),
                ('imagealt', models.CharField(blank=True, max_length=255, null=True)),
                ('lastnamephonetic', models.CharField(blank=True, max_length=255, null=True)),
                ('firstnamephonetic', models.CharField(blank=True, max_length=255, null=True)),
                ('middlename', models.CharField(blank=True, max_length=255, null=True)),
                ('alternatename', models.CharField(blank=True, max_length=255, null=True)),
            ],
            options={
                'db_table': 'mdl_user',
                'managed': True,
            },
        ),
        migrations.AlterUniqueTogether(
            name='mdluser',
            unique_together=set([('mnethostid', 'username')]),
        ),
        migrations.AddField(
            model_name='mdlgradegrades',
            name='itemid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='moodle.MdlGradeItems'),
        ),
        migrations.AddField(
            model_name='mdlgradegrades',
            name='userid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='moodle.MdlUser'),
        ),
        migrations.AlterUniqueTogether(
            name='mdlgradegrades',
            unique_together=set([('userid', 'itemid')]),
        ),
    ]
