Skip to content

Commit

Permalink
fix: make migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Apr 15, 2024
1 parent 971082d commit 15a5324
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 7 additions & 4 deletions codeforlife/user/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Generated by Django 3.2.24 on 2024-04-10 14:01
# Generated by Django 3.2.24 on 2024-04-15 10:04

import codeforlife.user.models.user
import django.contrib.auth.models
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion

Expand All @@ -12,8 +11,8 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('common', '0048_unique_school_names'),
('auth', '0012_alter_user_first_name_max_length'),
('common', '0048_unique_school_names'),
]

operations = [
Expand Down Expand Up @@ -82,9 +81,13 @@ class Migration(migrations.Migration):
name='OtpBypassToken',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('token', models.CharField(max_length=8, validators=[django.core.validators.MinLengthValidator(8)])),
('token', models.CharField(max_length=8, verbose_name='token')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='otp_bypass_tokens', to='user.user')),
],
options={
'verbose_name': 'OTP bypass token',
'verbose_name_plural': 'OTP bypass tokens',
},
),
migrations.CreateModel(
name='AuthFactor',
Expand Down
1 change: 0 additions & 1 deletion codeforlife/user/models/otp_bypass_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def bulk_create(self, user: User): # type: ignore[override]
class Meta(TypedModelMeta):
verbose_name = _("OTP bypass token")
verbose_name_plural = _("OTP bypass tokens")
unique_together = ("user", "token")

def save(self, *args, **kwargs):
raise IntegrityError("Cannot create or update a single instance.")
Expand Down

0 comments on commit 15a5324

Please sign in to comment.