schon/vibes_auth/migrations/0001_initial.py
Egor fureunoir Gorbunov 12ccd04943 Update API version to 2.6.0 and reformat migration files
Updated the API version from 2.5.0 to 2.6.0 in the DRF settings for consistency across configurations. Reformatted migration files for better readability, ensuring consistency in code style and improving maintainability. These changes do not alter functionality but enhance clarity and documentation.
2025-05-06 19:19:49 +03:00

106 lines
6.4 KiB
Python

# Generated by Django 5.1.5 on 2025-03-10 11:56
import uuid
import django.contrib.auth.models
import django.utils.timezone
import django_extensions.db.fields
from django.db import migrations, models
import vibes_auth.managers
import vibes_auth.models
import vibes_auth.validators
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Group',
fields=[
],
options={
'verbose_name': 'group',
'verbose_name_plural': 'groups',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('auth.group',),
managers=[
('objects', django.contrib.auth.models.GroupManager()),
],
),
migrations.CreateModel(
name='User',
fields=[
('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')),
('is_staff', models.BooleanField(default=False,
help_text='Designates whether the user can log into this admin site.',
verbose_name='staff status')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False,
help_text='unique id is used to surely identify any database object',
primary_key=True, serialize=False, verbose_name='unique id')),
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True,
help_text='when the object first appeared on the database',
verbose_name='created')),
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True,
help_text='when the object was last modified',
verbose_name='modified')),
('email',
models.EmailField(help_text='user email address', max_length=254, unique=True, verbose_name='email')),
('phone_number',
models.CharField(blank=True, help_text='user phone number', max_length=20, null=True, unique=True,
validators=[vibes_auth.validators.validate_phone_number],
verbose_name='phone_number')),
('first_name', models.CharField(blank=True, max_length=150, null=True, verbose_name='first_name')),
('last_name', models.CharField(blank=True, max_length=150, null=True, verbose_name='last_name')),
('avatar', models.ImageField(blank=True, help_text='user profile image', null=True,
upload_to=vibes_auth.models.User.get_uuid_as_path, verbose_name='avatar')),
('is_verified',
models.BooleanField(default=False, help_text='user verification status', verbose_name='is verified')),
('is_active', models.BooleanField(default=False, help_text='unselect this instead of deleting accounts',
verbose_name='is_active')),
('is_subscribed', models.BooleanField(default=False, help_text="user's newsletter subscription status",
verbose_name='is_subscribed')),
('activation_token', models.UUIDField(default=uuid.uuid4, verbose_name='activation token')),
('language', models.CharField(
choices=[('en-GB', 'English (British)'), ('ar-AR', 'العربية'), ('cs-CZ', 'Česky'),
('da-DK', 'Dansk'), ('de-DE', 'Deutsch'), ('en-US', 'English (American)'),
('es-ES', 'Español'), ('fr-FR', 'Français'), ('hi-IN', 'हिंदी'), ('it-IT', 'Italiano'),
('ja-JP', '日本語'), ('kk-KZ', 'Қазақ'), ('nl-NL', 'Nederlands'), ('pl-PL', 'Polska'),
('pt-BR', 'Português'), ('ro-RO', 'Română'), ('ru-RU', 'Русский'),
('zh-hans', '简体中文')], default='en-GB', max_length=7)),
('attributes', models.JSONField(blank=True, default=dict, null=True, verbose_name='attributes')),
('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')),
('recently_viewed',
models.ManyToManyField(blank=True, help_text='recently viewed products', to='core.product',
verbose_name='recently viwed')),
('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')),
],
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'swappable': 'AUTH_USER_MODEL',
},
managers=[
('objects', vibes_auth.managers.UserManager()),
],
),
]