prevent creating new tables
This commit is contained in:
@@ -5,6 +5,7 @@ from django.db import migrations, models
|
|||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
initial = True
|
initial = True
|
||||||
@@ -13,6 +14,8 @@ class Migration(migrations.Migration):
|
|||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
|
migrations.SeparateDatabaseAndState(
|
||||||
|
state_operations=[
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Address',
|
name='Address',
|
||||||
fields=[
|
fields=[
|
||||||
@@ -25,6 +28,12 @@ class Migration(migrations.Migration):
|
|||||||
('country_iso_code', models.CharField(max_length=3, validators=[django.core.validators.MinLengthValidator(3)])),
|
('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(
|
migrations.CreateModel(
|
||||||
name='Letting',
|
name='Letting',
|
||||||
fields=[
|
fields=[
|
||||||
@@ -33,4 +42,8 @@ class Migration(migrations.Migration):
|
|||||||
('address', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='lettings.Address')),
|
('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 = [
|
operations = [
|
||||||
|
migrations.SeparateDatabaseAndState(
|
||||||
|
state_operations=[
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Profile',
|
name='Profile',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id',
|
||||||
('favorite_city', models.CharField(blank=True, max_length=64)),
|
models.AutoField(auto_created=True, primary_key=True,
|
||||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
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