Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Drop 'unique' constraint from category's slug field
Marcin Gębala7383584d0ff8
diff --git a/saleor/product/migrations/0001_initial.py b/saleor/product/migrations/0001_initial.pyindex 378e487180..9aedd0e88c 100644--- a/saleor/product/migrations/0001_initial.py+++ b/saleor/product/migrations/0001_initial.py@@ -31,7 +31,7 @@ class Migration(migrations.Migration):fields=[('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),('name', models.CharField(max_length=128, verbose_name='name')),- ('slug', models.SlugField(unique=True, verbose_name='slug')),+ ('slug', models.SlugField(verbose_name='slug')),('description', models.TextField(verbose_name='description', blank=True)),('hidden', models.BooleanField(default=False, verbose_name='hidden')),('lft', models.PositiveIntegerField(editable=False, db_index=True)),diff --git a/saleor/product/models/base.py b/saleor/product/models/base.pyindex b9f640f8ae..8cde6cddcd 100644--- a/saleor/product/models/base.py+++ b/saleor/product/models/base.py@@ -30,7 +30,7 @@ class Category(MPTTModel):name = models.CharField(pgettext_lazy('Category field', 'name'), max_length=128)slug = models.SlugField(- pgettext_lazy('Category field', 'slug'), max_length=50, unique=True)+ pgettext_lazy('Category field', 'slug'), max_length=50)description = models.TextField(pgettext_lazy('Category field', 'description'), blank=True)parent = models.ForeignKey(