0003 department alter employee department
Generated by Django 5.1.2 on 2024-10-18 20:07
In [1]:
Copied!
import django.db.models.deletion
from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models
In [2]:
Copied!
class Migration(migrations.Migration):
dependencies = [
('app', '0002_employee'),
]
operations = [
migrations.CreateModel(
name='Department',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
],
),
migrations.AlterField(
model_name='employee',
name='department',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.department'),
),
]
class Migration(migrations.Migration):
dependencies = [
('app', '0002_employee'),
]
operations = [
migrations.CreateModel(
name='Department',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
],
),
migrations.AlterField(
model_name='employee',
name='department',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.department'),
),
]