Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Change name of field in original migrations of stock location model
Mira Szewczyk4a5b9dbe408c
diff --git a/saleor/product/migrations/0013_auto_20161207_0555.py b/saleor/product/migrations/0013_auto_20161207_0555.pyindex fb979003e8..225d7ebbbd 100644--- a/saleor/product/migrations/0013_auto_20161207_0555.py+++ b/saleor/product/migrations/0013_auto_20161207_0555.py@@ -17,7 +17,7 @@ class Migration(migrations.Migration):name='StockLocation',fields=[('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),- ('location', models.CharField(max_length=100, verbose_name='location')),+ ('name', models.CharField(max_length=100, verbose_name='name')),],),migrations.AddField(diff --git a/saleor/product/migrations/0015_transfer_locations.py b/saleor/product/migrations/0015_transfer_locations.pyindex 875c1c87ac..b9fda1171d 100644--- a/saleor/product/migrations/0015_transfer_locations.py+++ b/saleor/product/migrations/0015_transfer_locations.py@@ -10,7 +10,7 @@ def forward_transfer_locations(apps, schema_editor):StockLocation = apps.get_model('product', 'StockLocation')for stock in Stock.objects.all():location = StockLocation.objects.get_or_create(- location=stock.location)[0]+ name=stock.location)[0]stock.location_link = locationstock.save()@@ -19,7 +19,7 @@ def reverse_transfer_locations(apps, schema_editor):Stock = apps.get_model('product', 'Stock')for stock in Stock.objects.all():if stock.location_link:- location = stock.location_link.location+ location = stock.location_link.namestock.location = locationstock.save()diff --git a/saleor/product/migrations/0019_auto_20161208_0324.py b/saleor/product/migrations/0019_auto_20161208_0324.pydeleted file mode 100644index de9e4156ff..0000000000--- a/saleor/product/migrations/0019_auto_20161208_0324.py+++ /dev/null@@ -1,20 +0,0 @@-# -*- coding: utf-8 -*--# Generated by Django 1.10.3 on 2016-12-08 09:24-from __future__ import unicode_literals--from django.db import migrations---class Migration(migrations.Migration):-- dependencies = [- ('product', '0018_auto_20161207_0844'),- ]-- operations = [- migrations.RenameField(- model_name='stocklocation',- old_name='location',- new_name='name',- ),- ]