update migrations file
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# Generated by Django 5.1.2 on 2024-12-13 17:49
|
||||
# Generated by Django 5.1.2 on 2025-01-27 18:07
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
@@ -8,7 +10,6 @@ class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('auth', '0012_alter_user_first_name_max_length'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@@ -19,21 +20,30 @@ class Migration(migrations.Migration):
|
||||
('password', models.CharField(max_length=128, verbose_name='password')),
|
||||
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
|
||||
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
|
||||
('email', models.EmailField(max_length=255, unique=True, verbose_name='ایمیل')),
|
||||
('phone_number', models.CharField(max_length=12, unique=True, verbose_name='شماره تماس')),
|
||||
('email', models.EmailField(blank=True, max_length=255, null=True, verbose_name='ایمیل')),
|
||||
('phone', models.CharField(max_length=12, unique=True, verbose_name='شماره تماس')),
|
||||
('first_name', models.CharField(blank=True, max_length=50, verbose_name='نام')),
|
||||
('last_name', models.CharField(blank=True, max_length=50, verbose_name='نام خانوادگی')),
|
||||
('profile_photo', models.ImageField(blank=True, null=True, upload_to='profile_photos/', verbose_name='عکس پروفایل')),
|
||||
('is_active', models.BooleanField(default=True)),
|
||||
('is_staff', models.BooleanField(default=False)),
|
||||
('date_joined', models.DateTimeField(auto_now_add=True, verbose_name='تاریخ ثبتنام')),
|
||||
('otp', models.CharField(blank=True, max_length=6, null=True, verbose_name='تاریخ ثبتنام')),
|
||||
('otp_expiry', models.DateTimeField(blank=True, null=True, verbose_name='تاریخ تمام شدن otp')),
|
||||
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
|
||||
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
|
||||
('otp_hash', models.CharField(blank=True, max_length=64, null=True, verbose_name='کد یک بار مصرف')),
|
||||
('otp_expiry', models.DateTimeField(blank=True, null=True, verbose_name='تاریخ تمام شدن کد یک بار مصرف')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='UserAddressModel',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=30)),
|
||||
('address', models.TextField()),
|
||||
('postal_code', models.CharField(max_length=10)),
|
||||
('phone', models.CharField(max_length=11)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='address', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2024-12-13 17:51
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='user',
|
||||
old_name='phone_number',
|
||||
new_name='phone',
|
||||
),
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2024-12-13 17:56
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0002_rename_phone_number_user_phone'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='email',
|
||||
field=models.EmailField(max_length=255, verbose_name='ایمیل'),
|
||||
),
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2024-12-13 19:08
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0003_alter_user_email'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='email',
|
||||
field=models.EmailField(blank=True, max_length=255, null=True, verbose_name='ایمیل'),
|
||||
),
|
||||
]
|
||||
@@ -1,21 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2024-12-13 19:13
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0004_alter_user_email'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='user',
|
||||
name='groups',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='user',
|
||||
name='user_permissions',
|
||||
),
|
||||
]
|
||||
@@ -1,26 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2024-12-14 10:38
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0005_remove_user_groups_remove_user_user_permissions'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='UserAddressModel',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=30)),
|
||||
('address', models.TextField()),
|
||||
('postal_code', models.CharField(max_length=10)),
|
||||
('phone', models.CharField(max_length=11)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2024-12-15 17:24
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0006_useraddressmodel'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='user',
|
||||
name='otp',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='otp_hash',
|
||||
field=models.CharField(blank=True, max_length=64, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='otp_expiry',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
]
|
||||
@@ -1,23 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2024-12-31 17:41
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0007_remove_user_otp_user_otp_hash_alter_user_otp_expiry'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='otp_expiry',
|
||||
field=models.DateTimeField(blank=True, null=True, verbose_name='تاریخ تمام شدن کد یک بار مصرف'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='otp_hash',
|
||||
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='کد یک بار مصرف'),
|
||||
),
|
||||
]
|
||||
@@ -1,20 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2025-01-11 18:05
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('account', '0008_alter_user_otp_expiry_alter_user_otp_hash'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='useraddressmodel',
|
||||
name='user',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='address', to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.1.2 on 2025-01-19 18:42
|
||||
# Generated by Django 5.1.2 on 2025-01-27 18:07
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.1.2 on 2025-01-27 17:20
|
||||
# Generated by Django 5.1.2 on 2025-01-27 18:07
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
@@ -9,7 +9,7 @@ class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('product', '0004_productmodel_show_subcategorymodel_show'),
|
||||
('product', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@@ -17,10 +17,10 @@ class Migration(migrations.Migration):
|
||||
name='SliderModel',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=50)),
|
||||
('image', models.ImageField(blank=True, null=True, upload_to='slider_image/')),
|
||||
('video', models.FileField(blank=True, null=True, upload_to='slider_video/')),
|
||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.productmodel')),
|
||||
('title', models.CharField(max_length=50, verbose_name='عنوان')),
|
||||
('image', models.ImageField(blank=True, null=True, upload_to='slider_image/', verbose_name='عکس اسلایدر')),
|
||||
('video', models.FileField(blank=True, null=True, upload_to='slider_video/', verbose_name='ویدیواسلایدر')),
|
||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.productmodel', verbose_name='محصول')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'اسلایدر',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.1.2 on 2025-01-25 23:47
|
||||
# Generated by Django 5.1.2 on 2025-01-27 18:07
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('account', '0009_alter_useraddressmodel_user'),
|
||||
('account', '0001_initial'),
|
||||
('product', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.1.2 on 2025-01-19 18:42
|
||||
# Generated by Django 5.1.2 on 2025-01-27 18:07
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
@@ -18,8 +18,8 @@ class Migration(migrations.Migration):
|
||||
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)),
|
||||
('price', models.FloatField(blank=True, null=True, verbose_name='قیمت دلار')),
|
||||
('defualt_price', models.FloatField(blank=True, default=80000.0, null=True, verbose_name='قیمت دستی')),
|
||||
('unique_filed', models.CharField(choices=[('unique', 'unique')], default='unique', max_length=20, unique=True)),
|
||||
],
|
||||
),
|
||||
@@ -42,12 +42,16 @@ class Migration(migrations.Migration):
|
||||
name='ProductModel',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255)),
|
||||
('description', models.TextField()),
|
||||
('price', models.PositiveIntegerField(default=0, help_text='قیمت')),
|
||||
('name', models.CharField(max_length=255, verbose_name='نام')),
|
||||
('description', models.TextField(verbose_name='توضیحات')),
|
||||
('price', models.PositiveIntegerField(default=0, verbose_name='قیمت')),
|
||||
('currency', models.CharField(choices=[('dollor', 'دلار'), ('toman', 'تومان'), ('derham', 'درهم')], max_length=20, verbose_name='نوع ارز')),
|
||||
('image', models.ImageField(upload_to='product_images/')),
|
||||
('rating', models.PositiveIntegerField(default=0)),
|
||||
('image1', models.ImageField(upload_to='product_images/', verbose_name='عکس اول')),
|
||||
('image2', models.ImageField(blank=True, null=True, upload_to='product_images/', verbose_name='عکس دوم')),
|
||||
('image3', models.ImageField(blank=True, null=True, upload_to='product_images/', verbose_name='عکس سوم')),
|
||||
('video', models.FileField(blank=True, null=True, upload_to='product_videos/', verbose_name='ویدیو')),
|
||||
('rating', models.PositiveIntegerField(default=0, verbose_name='امتیاز')),
|
||||
('show', models.BooleanField(default=False, verbose_name='نمایش در خانه')),
|
||||
('view', models.IntegerField(default=0, verbose_name='بازدید')),
|
||||
('sell', models.IntegerField(default=0, verbose_name='فروش')),
|
||||
('in_stock', models.IntegerField(default=0, verbose_name='تعداد موجود')),
|
||||
@@ -66,7 +70,7 @@ class Migration(migrations.Migration):
|
||||
('content', models.TextField(verbose_name='محتوای نظر')),
|
||||
('timestamp', models.DateTimeField(auto_now_add=True, verbose_name='زمان ثبت کامنت')),
|
||||
('show', models.BooleanField(default=True, verbose_name='نشان دادن کامنت')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='کاربر')),
|
||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='product.productmodel', verbose_name='محصول')),
|
||||
],
|
||||
options={
|
||||
@@ -78,6 +82,7 @@ class Migration(migrations.Migration):
|
||||
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')),
|
||||
('show', models.BooleanField(default=False, verbose_name='نمایش در خانه')),
|
||||
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subcategorys', to='product.maincategorymodel', verbose_name='دسته\u200cبندی والد')),
|
||||
],
|
||||
options={
|
||||
@@ -89,6 +94,6 @@ class Migration(migrations.Migration):
|
||||
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'),
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='products', to='product.subcategorymodel', verbose_name='دسته بندی محصول'),
|
||||
),
|
||||
]
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2025-01-26 17:12
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='productmodel',
|
||||
old_name='image',
|
||||
new_name='image1',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='productmodel',
|
||||
name='image2',
|
||||
field=models.ImageField(blank=True, null=True, upload_to='product_images/'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='productmodel',
|
||||
name='image3',
|
||||
field=models.ImageField(blank=True, null=True, upload_to='product_images/'),
|
||||
),
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2025-01-27 15:43
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0002_rename_image_productmodel_image1_productmodel_image2_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='productmodel',
|
||||
name='video',
|
||||
field=models.FileField(blank=True, null=True, upload_to='product_videos/'),
|
||||
),
|
||||
]
|
||||
@@ -1,23 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2025-01-27 17:20
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0003_productmodel_video'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='productmodel',
|
||||
name='show',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='subcategorymodel',
|
||||
name='show',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.1.2 on 2024-12-14 10:51
|
||||
# Generated by Django 5.1.2 on 2025-01-27 18:07
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ services:
|
||||
[
|
||||
"sh",
|
||||
"-c",
|
||||
"python manage.py makemigrations --merge && python manage.py migrate && python manage.py runserver 0.0.0.0:8000",
|
||||
"python manage.py migrate && python manage.py runserver 0.0.0.0:8000",
|
||||
]
|
||||
networks:
|
||||
- default
|
||||
|
||||
Reference in New Issue
Block a user