Skip to content

Commit

Permalink
migration: created migration for customer_vehicle models
Browse files Browse the repository at this point in the history
  • Loading branch information
kherin committed Jan 18, 2024
1 parent e87fbc6 commit f53836e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions project1/myapp/migrations/0004_customer_vehicle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 4.1.7 on 2024-01-16 10:01

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('myapp', '0003_drinkscategory_drinks_category_id'),
]

operations = [
migrations.CreateModel(
name='Customer',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name='Vehicle',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Vehicle', to='myapp.customer')),
],
),
]

0 comments on commit f53836e

Please sign in to comment.