migrations problem
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# Generated by Django 5.1.2 on 2025-01-01 17:58
|
# Generated by Django 5.1.2 on 2025-01-19 18:36
|
||||||
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
|
|||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('product', '0005_categorymodel'),
|
('product', '0001_initial'),
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# Generated by Django 5.1.2 on 2024-12-12 13:57
|
# Generated by Django 5.1.2 on 2025-01-19 18:36
|
||||||
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
from django.conf import settings
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
@@ -9,16 +10,42 @@ class Migration(migrations.Migration):
|
|||||||
initial = True
|
initial = True
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Product',
|
name='DollorModel',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('price', models.FloatField(blank=True, null=True)),
|
||||||
|
('defualt_price', models.FloatField(blank=True, default=80000.0, null=True)),
|
||||||
|
('unique_filed', models.CharField(choices=[('unique', 'unique')], default='unique', max_length=20, unique=True)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='MainCategoryModel',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=50, verbose_name='نام')),
|
||||||
|
('slug', models.SlugField(help_text='اسم دسته را برای مسیر به انگلیسی و بدون فاصله وارد کنید', unique=True)),
|
||||||
|
('icon', models.ImageField(blank=True, null=True, upload_to='category_model/', verbose_name='آیکون')),
|
||||||
|
('meta_title', models.CharField(blank=True, help_text='عنوان متا برای SEO', max_length=60, null=True, verbose_name='عنوان متا')),
|
||||||
|
('meta_description', models.TextField(blank=True, help_text='توضیحات متا برای SEO', max_length=160, null=True, verbose_name='توضیحات متا')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'دسته\u200cبندی اصلی',
|
||||||
|
'verbose_name_plural': 'دسته\u200cبندی\u200cهااصلی',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='ProductModel',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('name', models.CharField(max_length=255)),
|
('name', models.CharField(max_length=255)),
|
||||||
('description', models.TextField()),
|
('description', models.TextField()),
|
||||||
('price', models.PositiveIntegerField(default=0)),
|
('price', models.PositiveIntegerField(default=0, help_text='قیمت')),
|
||||||
|
('currency', models.CharField(choices=[('dollor', 'دلار'), ('toman', 'تومان'), ('derham', 'درهم')], max_length=20, verbose_name='نوع ارز')),
|
||||||
('image', models.ImageField(upload_to='product_images/')),
|
('image', models.ImageField(upload_to='product_images/')),
|
||||||
('rating', models.PositiveIntegerField(default=0)),
|
('rating', models.PositiveIntegerField(default=0)),
|
||||||
('view', models.IntegerField(default=0, verbose_name='بازدید')),
|
('view', models.IntegerField(default=0, verbose_name='بازدید')),
|
||||||
@@ -26,24 +53,42 @@ class Migration(migrations.Migration):
|
|||||||
('in_stock', models.IntegerField(default=0, verbose_name='تعداد موجود')),
|
('in_stock', models.IntegerField(default=0, verbose_name='تعداد موجود')),
|
||||||
('discount', models.SmallIntegerField(default=0, verbose_name='تخفیف')),
|
('discount', models.SmallIntegerField(default=0, verbose_name='تخفیف')),
|
||||||
('slug', models.SlugField(allow_unicode=True, blank=True, help_text='این فیلد را خالی بگذارید', null=True, unique=True, verbose_name='نام یکتا')),
|
('slug', models.SlugField(allow_unicode=True, blank=True, help_text='این فیلد را خالی بگذارید', null=True, unique=True, verbose_name='نام یکتا')),
|
||||||
('link_of_metas', models.CharField(blank=True, max_length=400, null=True, verbose_name='لینک استخراج متا')),
|
|
||||||
('meta_description', models.CharField(blank=True, help_text='این فیلد را حتما پر کنید', max_length=300, null=True)),
|
('meta_description', models.CharField(blank=True, help_text='این فیلد را حتما پر کنید', max_length=300, null=True)),
|
||||||
('meta_keywords', models.CharField(blank=True, help_text='این فیلد را حتما پر کنید', max_length=300, null=True)),
|
('meta_keywords', models.CharField(blank=True, help_text='این فیلد را حتما پر کنید', max_length=300, null=True)),
|
||||||
('meta_rating', models.FloatField(default=5, help_text='امتیاز محصول')),
|
('meta_rating', models.FloatField(default=5, help_text='امتیاز محصول')),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='زمان ثبت محصول')),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='CommentModel',
|
name='CommentModel',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('comment', models.TextField()),
|
('content', models.TextField(verbose_name='محتوای نظر')),
|
||||||
('timestamp', models.DateTimeField(auto_now_add=True)),
|
('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='زمان ثبت کامنت')),
|
||||||
('show', models.BooleanField(default=False)),
|
('show', models.BooleanField(default=True, verbose_name='نشان دادن کامنت')),
|
||||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='product.product')),
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||||
|
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='product.productmodel', verbose_name='محصول')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'verbose_name': 'نظر',
|
'verbose_name': 'نظر',
|
||||||
'verbose_name_plural': 'نظرات',
|
'verbose_name_plural': 'نظرات',
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='SubCategoryModel',
|
||||||
|
fields=[
|
||||||
|
('maincategorymodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='product.maincategorymodel')),
|
||||||
|
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subcategorys', to='product.maincategorymodel', verbose_name='دسته\u200cبندی والد')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'زیر دسته\u200cبندی',
|
||||||
|
'verbose_name_plural': 'زیر دسته\u200cبندی\u200cها',
|
||||||
|
},
|
||||||
|
bases=('product.maincategorymodel',),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='productmodel',
|
||||||
|
name='category',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='products', to='product.subcategorymodel'),
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
-39
@@ -1,39 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2024-12-12 14:34
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='commentmodel',
|
|
||||||
name='comment',
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='commentmodel',
|
|
||||||
name='content',
|
|
||||||
field=models.TextField(default='', verbose_name='محتوای نظر'),
|
|
||||||
preserve_default=False,
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='commentmodel',
|
|
||||||
name='product',
|
|
||||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='product.product', verbose_name='محصول'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='commentmodel',
|
|
||||||
name='show',
|
|
||||||
field=models.BooleanField(default=True, verbose_name='نشان دادن کامنت'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='commentmodel',
|
|
||||||
name='timestamp',
|
|
||||||
field=models.DateTimeField(auto_now_add=True, verbose_name='زمان ثبت کامنت'),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2024-12-12 15:03
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.conf import settings
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0002_remove_commentmodel_comment_commentmodel_content_and_more'),
|
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='commentmodel',
|
|
||||||
name='user',
|
|
||||||
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
|
|
||||||
preserve_default=False,
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2024-12-12 18:22
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0003_commentmodel_user'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RenameModel(
|
|
||||||
old_name='Product',
|
|
||||||
new_name='ProductModel',
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2024-12-13 07:51
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0004_rename_product_productmodel'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='CategoryModel',
|
|
||||||
fields=[
|
|
||||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('name', models.CharField(max_length=50, verbose_name='نام دسته\u200cبندی')),
|
|
||||||
('slug', models.SlugField(help_text='اسم دسته را برای مسیر به انگلیسی و بدون فاصله وارد کنید', unique=True)),
|
|
||||||
('icon', models.CharField(blank=True, max_length=100, null=True, verbose_name='آیکون دسته\u200cبندی')),
|
|
||||||
('meta_title', models.CharField(blank=True, help_text='عنوان متا برای SEO', max_length=60, null=True, verbose_name='عنوان متا')),
|
|
||||||
('meta_description', models.TextField(blank=True, help_text='توضیحات متا برای SEO', max_length=160, null=True, verbose_name='توضیحات متا')),
|
|
||||||
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='product.categorymodel', verbose_name='دسته\u200cبندی والد')),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'verbose_name': 'دسته\u200cبندی',
|
|
||||||
'verbose_name_plural': 'دسته\u200cبندی\u200cها',
|
|
||||||
'ordering': ['parent__id', 'id'],
|
|
||||||
},
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# Generated by Django 5.0 on 2025-01-11 13:51
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0005_categorymodel'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='DollorModel',
|
|
||||||
fields=[
|
|
||||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('price', models.PositiveIntegerField()),
|
|
||||||
('unique_filed', models.CharField(choices=[('unique', 'unique')], default='unique', max_length=20, unique=True)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='productmodel',
|
|
||||||
name='price',
|
|
||||||
field=models.PositiveIntegerField(default=0, help_text='قیمت درهمی'),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# Generated by Django 5.0 on 2025-01-11 13:59
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0006_dollormodel_alter_productmodel_price'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='dollormodel',
|
|
||||||
name='price',
|
|
||||||
field=models.FloatField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# Generated by Django 5.0 on 2025-01-11 14:07
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0007_alter_dollormodel_price'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='productmodel',
|
|
||||||
name='currency',
|
|
||||||
field=models.CharField(choices=[('dollor', 'دلار'), ('toman', 'تومان'), ('derham', 'درهم')], default='toman', max_length=20, verbose_name='نوع ارز'),
|
|
||||||
preserve_default=False,
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='productmodel',
|
|
||||||
name='price',
|
|
||||||
field=models.PositiveIntegerField(default=0, help_text='قیمت'),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# Generated by Django 5.0 on 2025-01-11 15:47
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0008_productmodel_currency_alter_productmodel_price'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='dollormodel',
|
|
||||||
name='defualt_price',
|
|
||||||
field=models.FloatField(blank=True, default=80000.0, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2025-01-13 14:20
|
|
||||||
|
|
||||||
from django.db import migrations
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0009_dollormodel_defualt_price'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='productmodel',
|
|
||||||
name='link_of_metas',
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2025-01-14 17:41
|
|
||||||
|
|
||||||
import django.utils.timezone
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0010_remove_productmodel_link_of_metas'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='productmodel',
|
|
||||||
name='created_at',
|
|
||||||
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now, verbose_name='زمان ثبت محصول'),
|
|
||||||
preserve_default=False,
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2025-01-14 18:31
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0011_productmodel_created_at'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='productmodel',
|
|
||||||
name='category',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.categorymodel'),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2025-01-19 17:02
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0012_productmodel_category'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='MainCategoryModel',
|
|
||||||
fields=[
|
|
||||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('name', models.CharField(max_length=50, verbose_name='نام')),
|
|
||||||
('slug', models.SlugField(help_text='اسم دسته را برای مسیر به انگلیسی و بدون فاصله وارد کنید', unique=True)),
|
|
||||||
('icon', models.CharField(blank=True, max_length=100, null=True, verbose_name='آیکون')),
|
|
||||||
('meta_title', models.CharField(blank=True, help_text='عنوان متا برای SEO', max_length=60, null=True, verbose_name='عنوان متا')),
|
|
||||||
('meta_description', models.TextField(blank=True, help_text='توضیحات متا برای SEO', max_length=160, null=True, verbose_name='توضیحات متا')),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'verbose_name': 'دسته\u200cبندی اصلی',
|
|
||||||
'verbose_name_plural': 'دسته\u200cبندی\u200cهااصلی',
|
|
||||||
},
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='SubCategoryModel',
|
|
||||||
fields=[
|
|
||||||
('maincategorymodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='product.maincategorymodel')),
|
|
||||||
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='product.maincategorymodel', verbose_name='دسته\u200cبندی والد')),
|
|
||||||
],
|
|
||||||
options={
|
|
||||||
'verbose_name': 'زیر دسته\u200cبندی',
|
|
||||||
'verbose_name_plural': 'زیر دسته\u200cبندی\u200cها',
|
|
||||||
},
|
|
||||||
bases=('product.maincategorymodel',),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='productmodel',
|
|
||||||
name='category',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.subcategorymodel'),
|
|
||||||
),
|
|
||||||
migrations.DeleteModel(
|
|
||||||
name='CategoryModel',
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2025-01-19 17:09
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0013_maincategorymodel_subcategorymodel_and_more'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='maincategorymodel',
|
|
||||||
name='icon',
|
|
||||||
field=models.ImageField(blank=True, null=True, upload_to='category_model/', verbose_name='آیکون'),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# Generated by Django 5.1.2 on 2025-01-19 18:21
|
|
||||||
|
|
||||||
import django.db.models.deletion
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('product', '0014_alter_maincategorymodel_icon'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='productmodel',
|
|
||||||
name='category',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='products', to='product.subcategorymodel'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='subcategorymodel',
|
|
||||||
name='parent',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subcategorys', to='product.maincategorymodel', verbose_name='دسته\u200cبندی والد'),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
Reference in New Issue
Block a user