prevent creating new tables
This commit is contained in:
@@ -5,6 +5,7 @@ from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
@@ -13,6 +14,8 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.SeparateDatabaseAndState(
|
||||
state_operations=[
|
||||
migrations.CreateModel(
|
||||
name='Address',
|
||||
fields=[
|
||||
@@ -25,6 +28,12 @@ class Migration(migrations.Migration):
|
||||
('country_iso_code', models.CharField(max_length=3, validators=[django.core.validators.MinLengthValidator(3)])),
|
||||
],
|
||||
),
|
||||
],
|
||||
# database already exists : see oc_lettings_site/migrations/0002_auto_20250904_1536.py
|
||||
database_operations=[],
|
||||
),
|
||||
migrations.SeparateDatabaseAndState(
|
||||
state_operations=[
|
||||
migrations.CreateModel(
|
||||
name='Letting',
|
||||
fields=[
|
||||
@@ -33,4 +42,8 @@ class Migration(migrations.Migration):
|
||||
('address', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='lettings.Address')),
|
||||
],
|
||||
),
|
||||
],
|
||||
# same, see oc_lettings_site/migrations/0002_auto_20250904_1536.py
|
||||
database_operations=[],
|
||||
),
|
||||
]
|
||||
|
||||
@@ -14,12 +14,22 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.SeparateDatabaseAndState(
|
||||
state_operations=[
|
||||
migrations.CreateModel(
|
||||
name='Profile',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('favorite_city', models.CharField(blank=True, max_length=64)),
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
('id',
|
||||
models.AutoField(auto_created=True, primary_key=True,
|
||||
serialize=False, verbose_name='ID')),
|
||||
('favorite_city',
|
||||
models.CharField(blank=True, max_length=64)),
|
||||
('user', models.OneToOneField(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
],
|
||||
database_operations=[],
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user