Skip to content

Commit c69270a

Browse files
updated
1 parent 36a21a7 commit c69270a

File tree

81 files changed

+1012
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1012
-0
lines changed
1.02 KB
Binary file not shown.
150 Bytes
Binary file not shown.
158 Bytes
Binary file not shown.
5.96 KB
Binary file not shown.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Generated by Django 6.0.1 on 2026-01-28 18:53
2+
3+
import django.core.validators
4+
import django.db.models.deletion
5+
import django.utils.timezone
6+
from django.db import migrations, models
7+
8+
9+
class Migration(migrations.Migration):
10+
11+
initial = True
12+
13+
dependencies = [
14+
("contenttypes", "0001_initial"),
15+
("auth", "0001_initial"),
16+
]
17+
run_before = [
18+
("admin", "0001_initial"), # Admin's migration references User table
19+
]
20+
21+
operations = [
22+
migrations.CreateModel(
23+
name='UserRole',
24+
fields=[
25+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
26+
('name', models.CharField(choices=[('admin', 'Admin'), ('user', 'User')], max_length=20, unique=True)),
27+
],
28+
options={
29+
'verbose_name': 'UserRole',
30+
'verbose_name_plural': 'UserRoles',
31+
'db_table': 'UserRole',
32+
},
33+
),
34+
migrations.CreateModel(
35+
name='User',
36+
fields=[
37+
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
38+
('email', models.EmailField(max_length=254, unique=True)),
39+
('username', models.CharField(blank=True, db_index=True, help_text='Only letters, numbers, hyphens (-) and underscores (_) allowed.', max_length=150, null=True, unique=True, validators=[django.core.validators.RegexValidator(code='invalid_slug_username', message='May only contain letters, numbers, hyphens (-) and underscores (_).', regex='^[a-zA-Z0-9_-]+$')])),
40+
('password', models.CharField(max_length=128)),
41+
('is_active', models.BooleanField(default=True)),
42+
('is_verified', models.BooleanField(default=False)),
43+
('date_joined', models.DateTimeField(default=django.utils.timezone.now)),
44+
('last_login', models.DateTimeField(blank=True, null=True)),
45+
('verification_token', models.CharField(blank=True, max_length=64, null=True)),
46+
('reset_password_token', models.CharField(blank=True, max_length=64, null=True)),
47+
('token_expires_at', models.DateTimeField(blank=True, null=True)),
48+
('pending_email', models.EmailField(blank=True, help_text='New email address pending verification', max_length=254, null=True)),
49+
('email_change_code', models.CharField(blank=True, help_text='6-digit verification code for email change', max_length=6, null=True)),
50+
('email_change_code_expires_at', models.DateTimeField(blank=True, help_text='Expiration time for email change code', null=True)),
51+
('role', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='users', to='account.userrole')),
52+
],
53+
options={
54+
'verbose_name': 'User',
55+
'verbose_name_plural': 'Users',
56+
'db_table': 'User',
57+
},
58+
),
59+
]

app_models/account/migrations/__init__.py

Whitespace-only changes.
Binary file not shown.
169 Bytes
Binary file not shown.
167 Bytes
Binary file not shown.
16.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)