# Generated by Django 2.0.7 on 2018-12-27 04:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Atom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('x', models.FloatField(default=0)),
                ('y', models.FloatField(default=0)),
                ('z', models.FloatField(default=0)),
                ('name', models.TextField(default='atom name')),
                ('color', models.TextField(default='#62A6DA')),
                ('mass', models.FloatField(default=0)),
                ('radius', models.FloatField(default=1)),
                ('molfileindex', models.IntegerField(default=-1)),
                ('documentindex', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Cluster',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('caption', models.TextField(default='cluster')),
            ],
        ),
        migrations.CreateModel(
            name='ClusterAtom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('atom', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.Atom')),
                ('cluster', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.Cluster')),
            ],
        ),
        migrations.CreateModel(
            name='DihedralAngle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(default='Двугранный угол')),
            ],
        ),
        migrations.CreateModel(
            name='DihedralAngleLink',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('angle', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.DihedralAngle')),
            ],
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creator', models.TextField(default='Wurka')),
                ('details', models.TextField(default='document details')),
                ('name', models.TextField(default='document name')),
                ('is_active', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Link',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('atom1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='atom1', to='editor.Atom')),
                ('atom2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='atom2', to='editor.Atom')),
                ('document', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.Document')),
            ],
        ),
        migrations.CreateModel(
            name='MatrixZ',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('coordinates', models.TextField(default='unknown')),
                ('units', models.TextField(default='unknown')),
                ('data', models.BinaryField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='MolFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='ValenceAngle',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(default='Валентный угол')),
                ('value', models.FloatField(default=0)),
                ('document', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.Document')),
            ],
        ),
        migrations.CreateModel(
            name='ValenceAngleLink',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('angle', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.ValenceAngle')),
                ('link', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.Link')),
            ],
        ),
        migrations.AddField(
            model_name='matrixz',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.MolFile'),
        ),
        migrations.AddField(
            model_name='dihedralanglelink',
            name='link',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.Link'),
        ),
        migrations.AddField(
            model_name='dihedralangle',
            name='document',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.Document'),
        ),
        migrations.AddField(
            model_name='cluster',
            name='document',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.Document'),
        ),
        migrations.AddField(
            model_name='atom',
            name='document',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='editor.Document'),
        ),
        migrations.AddField(
            model_name='atom',
            name='molfile',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='editor.MolFile'),
        ),
    ]
