django_magazine/accounts/migrations/0001_initial.py

50 lines
2.2 KiB
Python
Raw Normal View History

2023-01-31 11:20:57 +00:00
# Generated by Django 4.1.5 on 2023-01-22 16:21
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Account',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('first_name', models.CharField(max_length=50)),
('last_name', models.CharField(max_length=50)),
('username', models.CharField(max_length=50, unique=True)),
('email', models.EmailField(max_length=100, unique=True)),
('Phone_number', models.CharField(max_length=50)),
('is_admin', models.BooleanField(default=False)),
('is_staff', models.BooleanField(default=False)),
('is_active', models.BooleanField(default=False)),
('is_superadmin', models.BooleanField(default=False)),
('date_joined_for_format', models.DateTimeField(auto_now_add=True)),
('last_login_for_format', models.DateTimeField(auto_now_add=True)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='UserProfile',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('address', models.TextField(blank=True, max_length=500)),
('profile_picture', models.ImageField(blank=True, default='static/user_image_default.png', upload_to='userprofile')),
('city', models.CharField(blank=True, max_length=20)),
('state', models.CharField(blank=True, max_length=20)),
('country', models.CharField(blank=True, max_length=20)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
]