# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-02 15:32
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='Accesspath',
            fields=[
                ('accessid', models.AutoField(db_column='ID', primary_key=True, serialize=False)),
                ('pathlink', models.CharField(db_column='PathLink', max_length=2000, null=True)),
                ('name', models.CharField(db_column='Name', max_length=1000, null=True)),
                ('archive', models.NullBooleanField(db_column='Archive')),
            ],
            options={
                'db_table': 'VS_AccessPath',
            },
        ),
        migrations.CreateModel(
            name='Component',
            fields=[
                ('compid', models.AutoField(db_column='CompID', primary_key=True, serialize=False)),
                ('comptype', models.CharField(db_column='CompType', max_length=255, null=True)),
                ('compnote', models.TextField(db_column='CompNote', max_length=1000, null=True)),
                ('compactive', models.DateField(db_column='CompActive')),
                ('compexpire', models.DateField(db_column='CompExpire')),
                ('archive', models.NullBooleanField(db_column='Archive')),
            ],
            options={
                'db_table': 'VS_Component',
            },
        ),
        migrations.CreateModel(
            name='Dataset',
            fields=[
                ('datasetid', models.AutoField(db_column='DataSetID', primary_key=True, serialize=False)),
                ('setname', models.CharField(db_column='SetName', max_length=255)),
                ('setdesc', models.CharField(db_column='SetDesc', max_length=500, null=True)),
                ('rules', models.CharField(db_column='Rules', max_length=255, null=True)),
                ('review', models.NullBooleanField(db_column='Review')),
            ],
            options={
                'db_table': 'VS_Dataset',
            },
        ),
        migrations.CreateModel(
            name='DetailType',
            fields=[
                ('detailtypeid', models.AutoField(db_column='DetailTypeID', primary_key=True, serialize=False)),
                ('detaildesc', models.CharField(db_column='DetailDesc', max_length=500)),
                ('archive', models.NullBooleanField(db_column='Archive')),
                ('datasetid', models.ForeignKey(blank=True, db_column='datasetid', null=True, on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.Dataset')),
            ],
            options={
                'db_table': 'VS_Detail_Type',
            },
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('orgid', models.AutoField(db_column='OrgID', primary_key=True, serialize=False)),
                ('orgname', models.CharField(db_column='OrgName', max_length=255)),
                ('description', models.CharField(db_column='Description', max_length=500, null=True)),
                ('street', models.CharField(db_column='Street', max_length=255, null=True)),
                ('city', models.CharField(db_column='City', max_length=50)),
                ('state', models.CharField(db_column='State', max_length=50)),
                ('zipcode', models.CharField(db_column='Zipcode', max_length=25, null=True)),
                ('orgqueue', models.NullBooleanField(db_column='OrgQueue')),
                ('inactive', models.NullBooleanField(db_column='Inactive')),
            ],
            options={
                'db_table': 'VS_Organization',
            },
        ),
        migrations.CreateModel(
            name='OrganizationType',
            fields=[
                ('orgtypeid', models.AutoField(db_column='OrgTypeID', primary_key=True, serialize=False)),
                ('typename', models.CharField(db_column='TypeName', max_length=255)),
            ],
            options={
                'db_table': 'VS_Organization_Type',
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('projectid', models.AutoField(db_column='ProjectID', primary_key=True, serialize=False)),
                ('projname', models.CharField(db_column='ProjName', max_length=255)),
                ('projectcatid', models.CharField(db_column='ProjectCatID', max_length=255)),
                ('archive', models.NullBooleanField(db_column='Archive')),
            ],
            options={
                'db_table': 'VS_Project',
            },
        ),
        migrations.CreateModel(
            name='ProjectDatasetRequest',
            fields=[
                ('projdatasetrequestid', models.AutoField(db_column='ProjDataSetRequestID', primary_key=True, serialize=False)),
                ('datelogged', models.DateField(db_column='DateLogged')),
                ('archive', models.NullBooleanField(db_column='Archive')),
                ('datasetid', models.ForeignKey(blank=True, db_column='DataSetID', null=True, on_delete=django.db.models.deletion.SET_NULL, to='ProjectSurveillance.Dataset')),
                ('projectid', models.ForeignKey(blank=True, db_column='ProjectID', null=True, on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.Project')),
            ],
            options={
                'db_table': 'VS_Project_Dataset_Request',
            },
        ),
        migrations.CreateModel(
            name='ProjectDetail',
            fields=[
                ('detailid', models.AutoField(db_column='DetailID', primary_key=True, serialize=False)),
                ('note', models.TextField(db_column='Note', null=True)),
                ('dateofevent', models.DateField(db_column='DateOfEvent')),
                ('detailtypeid', models.ForeignKey(db_column='DetailTypeID', on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.DetailType')),
                ('projectid', models.ForeignKey(db_column='ProjectID', on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.Project')),
            ],
            options={
                'db_table': 'VS_Project_Detail',
            },
        ),
        migrations.CreateModel(
            name='ProjectVariable',
            fields=[
                ('projvarid', models.AutoField(db_column='ProjVarID', primary_key=True, serialize=False)),
                ('datelogged', models.DateField(db_column='DateLogged')),
                ('analysis', models.NullBooleanField(db_column='Analysis')),
                ('joined', models.NullBooleanField(db_column='Joined')),
                ('archive', models.NullBooleanField(db_column='Archive')),
                ('projectid', models.ForeignKey(db_column='ProjectID', on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.Project')),
            ],
            options={
                'db_table': 'VS_Project_Variable',
            },
        ),
        migrations.CreateModel(
            name='UserOrganization',
            fields=[
                ('userorgid', models.AutoField(db_column='UserOrgID', primary_key=True, serialize=False)),
                ('archive', models.NullBooleanField(db_column='Archive')),
                ('orgid', models.ForeignKey(blank=True, db_column='OrgID', null=True, on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.Organization')),
            ],
            options={
                'db_table': 'VS_User_Organization',
            },
        ),
        migrations.CreateModel(
            name='UserProject',
            fields=[
                ('usersprojid', models.AutoField(db_column='UsersProjID', primary_key=True, serialize=False)),
                ('projrole', models.CharField(db_column='ProjRole', max_length=255, null=True)),
                ('begindate', models.DateField(db_column='BeginDate')),
                ('enddate', models.DateField(blank=True, db_column='EndDate', null=True)),
                ('archive', models.NullBooleanField(db_column='Archive')),
                ('datatranscoordinator', models.NullBooleanField(db_column='DataTransCoordinator')),
                ('projectid', models.ForeignKey(db_column='ProjectID', on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.Project')),
            ],
            options={
                'db_table': 'VS_User_Project',
            },
        ),
        migrations.CreateModel(
            name='Variable',
            fields=[
                ('varid', models.AutoField(db_column='VarID', primary_key=True, serialize=False)),
                ('varname', models.CharField(db_column='VarName', max_length=255, null=True)),
                ('shortdesc', models.CharField(db_column='ShortDesc', max_length=255, null=True)),
                ('fulldesc', models.CharField(db_column='FullDesc', max_length=500, null=True)),
            ],
            options={
                'db_table': 'VS_Variable',
            },
        ),
        migrations.CreateModel(
            name='VariableDataset',
            fields=[
                ('vardatasetid', models.AutoField(db_column='VarDataSetID', primary_key=True, serialize=False)),
                ('archive', models.NullBooleanField(db_column='Archive')),
                ('datasetid', models.ForeignKey(blank=True, db_column='DataSetID', null=True, on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.Dataset')),
                ('varid', models.ForeignKey(blank=True, db_column='VarID', null=True, on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.Variable')),
            ],
            options={
                'db_table': 'VS_Variable_Dataset',
            },
        ),
        migrations.CreateModel(
            name='VSUser',
            fields=[
                ('userid', models.AutoField(db_column='UserID', primary_key=True, serialize=False)),
                ('fname', models.CharField(db_column='Fname', max_length=50)),
                ('lname', models.CharField(db_column='Lname', max_length=50)),
                ('useremail', models.EmailField(db_column='UserEmail', max_length=254)),
                ('phone', models.CharField(db_column='Phone', max_length=25, null=True)),
            ],
            options={
                'db_table': 'VS_User',
            },
        ),
        migrations.CreateModel(
            name='Workstep',
            fields=[
                ('workstepid', models.AutoField(db_column='WorkStepID', primary_key=True, serialize=False)),
                ('stepname', models.CharField(db_column='StepName', max_length=1000, null=True)),
                ('parentid', models.IntegerField(db_column='ParentID', null=True)),
                ('archive', models.NullBooleanField(db_column='Archive')),
            ],
            options={
                'db_table': 'VS_Workstep',
            },
        ),
        migrations.AddField(
            model_name='userproject',
            name='userid',
            field=models.ForeignKey(db_column='UserID', on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.VSUser'),
        ),
        migrations.AddField(
            model_name='userorganization',
            name='userid',
            field=models.ForeignKey(blank=True, db_column='UserID', null=True, on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.VSUser'),
        ),
        migrations.AddField(
            model_name='projectvariable',
            name='vardatasetid',
            field=models.ForeignKey(blank=True, db_column='VarDataSetID', null=True, on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.VariableDataset'),
        ),
        migrations.AddField(
            model_name='projectdetail',
            name='userid',
            field=models.ForeignKey(db_column='UserID', on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.VSUser'),
        ),
        migrations.AddField(
            model_name='organization',
            name='orgtypeid',
            field=models.ForeignKey(blank=True, db_column='OrgTypeID', null=True, on_delete=django.db.models.deletion.SET_NULL, to='ProjectSurveillance.OrganizationType'),
        ),
        migrations.AddField(
            model_name='component',
            name='projectid',
            field=models.ForeignKey(db_column='ProjectID', on_delete=django.db.models.deletion.CASCADE, to='ProjectSurveillance.Project'),
        ),
    ]
