remove migrations

This commit is contained in:
ilia 2022-10-08 14:42:58 +03:00
parent a64f07848c
commit 779648b535
3 changed files with 67 additions and 4 deletions

View File

@ -0,0 +1,19 @@
# Generated by Django 4.0.8 on 2022-10-08 11:42
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('marketplace', '0002_product_slug_alter_product_description'),
]
operations = [
migrations.AlterField(
model_name='product',
name='price',
field=models.IntegerField(validators=[django.core.validators.MinValueValidator(0)]),
),
]

View File

@ -0,0 +1,44 @@
# Generated by Django 4.0.8 on 2022-10-08 11:42
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0002_clan_user_salary_user_type_user_clan'),
]
operations = [
migrations.AddField(
model_name='user',
name='name',
field=models.CharField(max_length=120, null=True),
),
migrations.AddField(
model_name='user',
name='respect',
field=models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)]),
),
migrations.AddField(
model_name='user',
name='telegram',
field=models.CharField(max_length=100, null=True, unique=True),
),
migrations.AddField(
model_name='user',
name='wallet_private_key',
field=models.CharField(max_length=96, null=True, unique=True),
),
migrations.AddField(
model_name='user',
name='wallet_public_key',
field=models.CharField(max_length=96, null=True, unique=True),
),
migrations.AlterField(
model_name='user',
name='salary',
field=models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)]),
),
]

View File

@ -26,7 +26,7 @@ class User(AbstractUser):
# image_cropped = models.ImageField(upload_to="cropped/", blank=True)
about = models.TextField(blank=True)
name = models.CharField(max_length=120)
name = models.CharField(max_length=120, null=True)
type = models.CharField(
max_length=6, choices=WorkerType.choices, default=WorkerType.WORKER
)
@ -34,9 +34,9 @@ class User(AbstractUser):
clan = models.ForeignKey(Clan, on_delete=models.CASCADE, null=True)
salary = models.IntegerField(default=0, validators=[MinValueValidator(0)])
respect = models.IntegerField(default=0, validators=[MinValueValidator(0)])
wallet_private_key = models.CharField(max_length=96, unique=True)
wallet_public_key = models.CharField(max_length=96, unique=True)
telegram = models.CharField(max_length=100, unique=True)
wallet_private_key = models.CharField(max_length=96, unique=True, null=True)
wallet_public_key = models.CharField(max_length=96, unique=True, null=True)
telegram = models.CharField(max_length=100, unique=True, null=True)
def __str__(self):
return self.username