Merge pull request 'add migrations files in shared app' (#66) from behruz into main
All checks were successful
Deploy to Production / build-and-deploy (push) Successful in 1m56s
All checks were successful
Deploy to Production / build-and-deploy (push) Successful in 1m56s
Reviewed-on: #66
This commit is contained in:
@@ -0,0 +1,55 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2026-04-20 10:14
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('shared', '0002_settingsmodel_created_at_settingsmodel_description_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='RegionModel',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('updated_at', models.DateTimeField(auto_now=True)),
|
||||||
|
('name', models.CharField(max_length=255, unique=True)),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Region',
|
||||||
|
'verbose_name_plural': 'Regions',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='DistrictModel',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('updated_at', models.DateTimeField(auto_now=True)),
|
||||||
|
('name', models.CharField(max_length=255, unique=True)),
|
||||||
|
('region', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='districts', to='shared.regionmodel')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'District',
|
||||||
|
'verbose_name_plural': 'Districts',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='VillageModel',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('updated_at', models.DateTimeField(auto_now=True)),
|
||||||
|
('name', models.CharField(max_length=255, unique=True)),
|
||||||
|
('district', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='villages', to='shared.districtmodel')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': 'Village',
|
||||||
|
'verbose_name_plural': 'Villages',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user