mirror of
https://github.com/i701/sarlink-portal-api.git
synced 2025-04-19 23:46:53 +00:00
update mobile field in User model to set default value to 0 and create corresponding migrations
This commit is contained in:
parent
7c940c9dd2
commit
aa69977d63
18
api/migrations/0007_alter_user_mobile.py
Normal file
18
api/migrations/0007_alter_user_mobile.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 5.1.2 on 2025-03-24 10:27
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("api", "0006_alter_user_mobile"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="user",
|
||||||
|
name="mobile",
|
||||||
|
field=models.CharField(blank=True, default=1, max_length=255, unique=True),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
]
|
17
api/migrations/0008_alter_user_mobile.py
Normal file
17
api/migrations/0008_alter_user_mobile.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 5.1.2 on 2025-03-24 10:28
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("api", "0007_alter_user_mobile"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name="user",
|
||||||
|
name="mobile",
|
||||||
|
field=models.CharField(blank=True, default=0, max_length=255, unique=True),
|
||||||
|
),
|
||||||
|
]
|
@ -11,7 +11,7 @@ from django.utils import timezone
|
|||||||
class User(AbstractUser):
|
class User(AbstractUser):
|
||||||
email = models.EmailField(unique=True, blank=True, null=True)
|
email = models.EmailField(unique=True, blank=True, null=True)
|
||||||
address = models.CharField(max_length=255, blank=True)
|
address = models.CharField(max_length=255, blank=True)
|
||||||
mobile = models.CharField(max_length=255, blank=True, unique=True)
|
mobile = models.CharField(max_length=255, blank=True, unique=True, default=0)
|
||||||
designation = models.CharField(max_length=255, blank=True)
|
designation = models.CharField(max_length=255, blank=True)
|
||||||
acc_no = models.CharField(max_length=255, blank=True)
|
acc_no = models.CharField(max_length=255, blank=True)
|
||||||
id_card = models.CharField(max_length=255, blank=True)
|
id_card = models.CharField(max_length=255, blank=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user