-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create migration file after change in .inviter
This is required because of the change introduced in this commit: 4235da2 Also, create a test to ensure that future commits don't forget to create any necessary migration files.
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 4.2.13 on 2024-06-13 12:44 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
("invitations", "0004_auto_20230328_1430"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="invitation", | ||
name="inviter", | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(app_label)s_%(class)ss", | ||
related_query_name="%(app_label)s_%(class)s", | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="inviter", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pytest | ||
from django.core.management import call_command | ||
|
||
|
||
class TestMigrations: | ||
@pytest.mark.django_db | ||
def test_all_necessary_migrations_created(self): | ||
try: | ||
call_command("makemigrations", "--check", "--dry-run") | ||
all_necessary_migrations_created = True | ||
except SystemExit: | ||
all_necessary_migrations_created = False | ||
assert all_necessary_migrations_created |