Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add migrations
fowczarek35c338122ab7
diff --git a/saleor/checkout/migrations/0019_checkout_gift_cards.py b/saleor/checkout/migrations/0019_checkout_gift_cards.pynew file mode 100644index 0000000000..c450a97c13--- /dev/null+++ b/saleor/checkout/migrations/0019_checkout_gift_cards.py@@ -0,0 +1,19 @@+# Generated by Django 2.2.1 on 2019-06-07 09:43++from django.db import migrations, models+++class Migration(migrations.Migration):++ dependencies = [+ ('giftcard', '0001_initial'),+ ('checkout', '0018_auto_20190410_0132'),+ ]++ operations = [+ migrations.AddField(+ model_name='checkout',+ name='gift_cards',+ field=models.ManyToManyField(blank=True, related_name='checkouts', to='giftcard.GiftCard'),+ ),+ ]diff --git a/saleor/giftcard/migrations/0001_initial.py b/saleor/giftcard/migrations/0001_initial.pynew file mode 100644index 0000000000..ce9e0d18fd--- /dev/null+++ b/saleor/giftcard/migrations/0001_initial.py@@ -0,0 +1,37 @@+# Generated by Django 2.2.1 on 2019-06-07 09:43++import datetime+from django.conf import settings+from django.db import migrations, models+import django.db.models.deletion+import django_prices.models+++class Migration(migrations.Migration):++ initial = True++ dependencies = [+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),+ ]++ operations = [+ migrations.CreateModel(+ name='GiftCard',+ fields=[+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),+ ('code', models.CharField(db_index=True, max_length=16, unique=True)),+ ('created', models.DateTimeField(auto_now_add=True)),+ ('start_date', models.DateField(default=datetime.date.today)),+ ('end_date', models.DateField(blank=True, null=True)),+ ('last_used_on', models.DateTimeField(blank=True, null=True)),+ ('is_active', models.BooleanField(default=True)),+ ('initial_balance', django_prices.models.MoneyField(currency='USD', decimal_places=2, max_digits=12)),+ ('current_balance', django_prices.models.MoneyField(currency='USD', decimal_places=2, max_digits=12)),+ ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='gift_cards', to=settings.AUTH_USER_MODEL)),+ ],+ options={+ 'permissions': (('manage_gift_card', 'Manage gift cards.'),),+ },+ ),+ ]diff --git a/saleor/order/migrations/0071_order_gift_cards.py b/saleor/order/migrations/0071_order_gift_cards.pynew file mode 100644index 0000000000..81672d69fa--- /dev/null+++ b/saleor/order/migrations/0071_order_gift_cards.py@@ -0,0 +1,19 @@+# Generated by Django 2.2.1 on 2019-06-07 09:43++from django.db import migrations, models+++class Migration(migrations.Migration):++ dependencies = [+ ('giftcard', '0001_initial'),+ ('order', '0070_drop_update_event_and_rename_events'),+ ]++ operations = [+ migrations.AddField(+ model_name='order',+ name='gift_cards',+ field=models.ManyToManyField(blank=True, related_name='orders', to='giftcard.GiftCard'),+ ),+ ]