micro_service_placeholder/microService/api/migrations/0002_address_test_address.py

35 lines
1.2 KiB
Python

# Generated by Django 5.1 on 2024-08-20 06:30
import django.db.models.deletion
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Address',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('address', models.CharField(max_length=200)),
('city', models.CharField(max_length=100)),
('state', models.CharField(max_length=100)),
('pincode', models.IntegerField()),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('timestamp', models.DateTimeField(auto_now_add=True)),
],
),
migrations.AddField(
model_name='test',
name='address',
field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='address_test_FK', to='api.address'),
preserve_default=False,
),
]