Skip to content

Commit

Permalink
applied migrations for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
iameraj committed Feb 19, 2024
1 parent 6caf6d3 commit 3c9893d
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
23 changes: 23 additions & 0 deletions app/core/migrations/0003_tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.9 on 2024-02-19 08:46

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


class Migration(migrations.Migration):

dependencies = [
('core', '0002_recipe'),
]

operations = [
migrations.CreateModel(
name='Tags',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
]
18 changes: 18 additions & 0 deletions app/core/migrations/0004_recipe_tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.9 on 2024-02-19 08:48

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('core', '0003_tags'),
]

operations = [
migrations.AddField(
model_name='recipe',
name='tags',
field=models.ManyToManyField(to='core.tags'),
),
]

0 comments on commit 3c9893d

Please sign in to comment.