28 lines
950 B
Python
Executable File
28 lines
950 B
Python
Executable File
# Generated by Django 4.1.2 on 2022-11-06 13:47
|
|
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('api', '0008_account_email'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='City',
|
|
fields=[
|
|
('code', models.CharField(max_length=20, primary_key=True, serialize=False, validators=[django.core.validators.RegexValidator(regex='^[0-9a-zA-Z_]*$')], verbose_name='Код города')),
|
|
('name', models.CharField(max_length=50, unique=True, verbose_name='Название города')),
|
|
],
|
|
),
|
|
migrations.AddField(
|
|
model_name='account',
|
|
name='city',
|
|
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.city'),
|
|
),
|
|
]
|