new_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.3 on 2016-12-22 21:37
  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):
  
      dependencies = [
          ('courses', '0019_courserun_default_ordering'),
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
          ('ecommerce', '0009_protect_audit'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Coupon',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('coupon_code', models.TextField(blank=True, null=True)),
                  ('amount_type', models.CharField(choices=[('percent-discount', 'percent-discount'), ('fixed-discount', 'fixed-discount')], max_length=30)),
                  ('amount', models.DecimalField(decimal_places=2, max_digits=20)),
                  ('num_coupons_available', models.IntegerField()),
                  ('num_redemptions', models.IntegerField()),
                  ('expiration_date', models.DateTimeField(null=True)),
                  ('disabled', models.BooleanField(default=False)),
                  ('course', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='courses.Course')),
                  ('course_run', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='courses.CourseRun')),
                  ('program', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='courses.Program')),
              ],
          ),
          migrations.CreateModel(
              name='RedeemedCoupon',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('coupon', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ecommerce.Coupon')),
                  ('order', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ecommerce.Order')),
              ],
          ),
          migrations.CreateModel(
              name='UserCoupon',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('available_redemptions', models.IntegerField()),
                  ('coupon', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ecommerce.Coupon')),
                  ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.AlterUniqueTogether(
              name='usercoupon',
              unique_together=set([('coupon', 'user')]),
          ),
          migrations.AlterUniqueTogether(
              name='redeemedcoupon',
              unique_together=set([('order', 'coupon')]),
          ),
      ]
  
subject: Add migration