mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Tests for #22325
This commit is contained in:
31
tests/migrations/test_migrations_custom_user/0001_initial.py
Normal file
31
tests/migrations/test_migrations_custom_user/0001_initial.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# encoding: utf8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
||||
migrations.CreateModel(
|
||||
"Author",
|
||||
[
|
||||
("id", models.AutoField(primary_key=True)),
|
||||
("name", models.CharField(max_length=255)),
|
||||
],
|
||||
),
|
||||
|
||||
migrations.CreateModel(
|
||||
"Tribble",
|
||||
[
|
||||
("id", models.AutoField(primary_key=True)),
|
||||
("author", models.ForeignKey(to=settings.AUTH_USER_MODEL, to_field="id")),
|
||||
],
|
||||
)
|
||||
|
||||
]
|
||||
Reference in New Issue
Block a user