text: # -*- coding: utf-8 -*-
  # Generated by Django 1.10 on 2016-08-23 05:49
  from __future__ import unicode_literals
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Answer',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('description', models.TextField(max_length=2000)),
                  ('create_date', models.DateTimeField(auto_now_add=True)),
                  ('update_date', models.DateTimeField(blank=True, null=True)),
                  ('votes', models.IntegerField(default=0)),
                  ('is_accepted', models.BooleanField(default=False)),
              ],
              options={
                  'verbose_name': 'Answer',
                  'ordering': ('-is_accepted', '-votes', 'create_date'),
                  'verbose_name_plural': 'Answers',
              },
          ),
          migrations.CreateModel(
              name='Question',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('title', models.CharField(max_length=255)),
                  ('description', models.TextField(max_length=2000)),
                  ('create_date', models.DateTimeField(auto_now_add=True)),
                  ('update_date', models.DateTimeField(auto_now_add=True)),
                  ('favorites', models.IntegerField(default=0)),
                  ('has_accepted_answer', models.BooleanField(default=False)),
                  ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'verbose_name': 'Question',
                  'ordering': ('-update_date',),
                  'verbose_name_plural': 'Questions',
              },
          ),
          migrations.CreateModel(
              name='Tag',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('tag', models.CharField(max_length=50)),
                  ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.Question')),
              ],
              options={
                  'verbose_name': 'Tag',
                  'verbose_name_plural': 'Tags',
              },
          ),
          migrations.AddField(
              model_name='answer',
              name='question',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='questions.Question'),
          ),
          migrations.AddField(
              model_name='answer',
              name='user',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
          ),
          migrations.AlterUniqueTogether(
              name='tag',
              unique_together=set([('tag', 'question')]),
          ),
          migrations.AlterIndexTogether(
              name='tag',
              index_together=set([('tag', 'question')]),
          ),
      ]
  