Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Clean up migrations

Artur Smęt0237b3a65fc7
diff --git a/saleor/product/migrations/0007_auto_20160112_0623.py b/saleor/product/migrations/0007_auto_20160112_0623.py
deleted file mode 100644
index bebcf20001..0000000000
--- a/saleor/product/migrations/0007_auto_20160112_0623.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.1 on 2016-01-12 12:23
-from __future__ import unicode_literals
-
-import django.core.validators
-from django.db import migrations, models
-import django_prices.models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('product', '0006_product_updated_at'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='fixedproductdiscount',
- name='percentage_discount',
- field=models.PositiveIntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(100)]),
- ),
- migrations.AlterField(
- model_name='fixedproductdiscount',
- name='discount',
- field=django_prices.models.PriceField(blank=True, currency='USD', decimal_places=2, max_digits=12, null=True, verbose_name='discount value'),
- ),
- ]
diff --git a/saleor/product/migrations/0007_auto_20160112_1025.py b/saleor/product/migrations/0007_auto_20160112_1025.py
new file mode 100644
index 0000000000..010289ee02
--- /dev/null
+++ b/saleor/product/migrations/0007_auto_20160112_1025.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.1 on 2016-01-12 16:25
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('product', '0006_product_updated_at'),
+ ]
+
+ operations = [
+ migrations.RenameModel('FixedProductDiscount', 'Discount')
+ ]
diff --git a/saleor/product/migrations/0008_auto_20160114_0733.py b/saleor/product/migrations/0008_auto_20160114_0733.py
new file mode 100644
index 0000000000..52f875379a
--- /dev/null
+++ b/saleor/product/migrations/0008_auto_20160114_0733.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.1 on 2016-01-14 13:33
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('product', '0007_auto_20160112_1025'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='discount',
+ name='discount',
+ ),
+ migrations.AddField(
+ model_name='discount',
+ name='type',
+ field=models.CharField(choices=[('fixed', 'Fixed amount'), ('percentage', 'Percentage discount')], default='fixed', max_length=10),
+ ),
+ migrations.AddField(
+ model_name='discount',
+ name='value',
+ field=models.DecimalField(decimal_places=2, default=0, help_text='Value for a discount. It could be fixed amount or percentage value in range 0-100', max_digits=12),
+ ),
+ ]
diff --git a/saleor/product/migrations/0008_fixedproductdiscount_categories.py b/saleor/product/migrations/0008_fixedproductdiscount_categories.py
deleted file mode 100644
index fb1f786318..0000000000
--- a/saleor/product/migrations/0008_fixedproductdiscount_categories.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.1 on 2016-01-12 14:43
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('product', '0007_auto_20160112_0623'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='fixedproductdiscount',
- name='categories',
- field=models.ManyToManyField(blank=True, to='product.Category'),
- ),
- ]
diff --git a/saleor/product/migrations/0009_auto_20160112_1025.py b/saleor/product/migrations/0009_auto_20160112_1025.py
deleted file mode 100644
index d943cd00e4..0000000000
--- a/saleor/product/migrations/0009_auto_20160112_1025.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.1 on 2016-01-12 16:25
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('product', '0008_fixedproductdiscount_categories'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Discount',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('name', models.CharField(max_length=255)),
- ('type', models.CharField(choices=[('fixed', 'Fixed amount'), ('percentage', 'Percentage discount')], max_length=10)),
- ('value', models.DecimalField(decimal_places=2, help_text='Value for a discount. It could be fixed amount or percentage value in range 0-100', max_digits=12)),
- ('categories', models.ManyToManyField(blank=True, to='product.Category')),
- ('products', models.ManyToManyField(blank=True, to='product.Product')),
- ],
- ),
- migrations.RemoveField(
- model_name='fixedproductdiscount',
- name='categories',
- ),
- migrations.RemoveField(
- model_name='fixedproductdiscount',
- name='products',
- ),
- migrations.DeleteModel(
- name='FixedProductDiscount',
- ),
- ]
diff --git a/saleor/product/migrations/0010_discount_apply_on.py b/saleor/product/migrations/0010_discount_apply_on.py
deleted file mode 100644
index 5d3bafe787..0000000000
--- a/saleor/product/migrations/0010_discount_apply_on.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.1 on 2016-01-14 10:40
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('product', '0009_auto_20160112_1025'),
- ]
-
- operations = [
- migrations.AddField(
- model_name='discount',
- name='apply_on',
- field=models.CharField(choices=[('products', 'Products'), ('categories', 'Categories'), ('both', 'Both products and categories')], default='both', max_length=10),
- ),
- ]