Skip to content

Commit

Permalink
Updating the ERD following changes in daycare model
Browse files Browse the repository at this point in the history
Adding the field Daycare_picture in DayCare table

Signed-off-by: Erez Cohen <[email protected]>
  • Loading branch information
ErezCohenn authored and OfirMatasas committed Apr 17, 2022
1 parent 34034fc commit 66b04c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion daycare/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DayCare(models.Model):
address = models.CharField(max_length=50, blank=True, validators=[MaxLengthValidator])

def __str__(self):
return f'{self.name} name'
return f'Daycare name: {self.name}'

@staticmethod
def get_daycare_by_id(daycare_id):
Expand Down
12 changes: 5 additions & 7 deletions review/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Generated by Django 4.0.3 on 2022-04-11 07:33
# Generated by Django 4.0.3 on 2022-03-29 21:22

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


class Migration(migrations.Migration):

initial = True

dependencies = [
('dogowner', '0001_initial'),
('daycare', '0001_initial'),
('dogowner', '0002_test_data'),
]

operations = [
Expand All @@ -23,10 +22,9 @@ class Migration(migrations.Migration):
('rating', models.IntegerField(validators=[django.core.validators.MinValueValidator(0),
django.core.validators.MaxValueValidator(5)])),
('creation_date', models.DateTimeField(auto_now_add=True)),
('daycare_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
to='daycare.daycare')),
('dogowner_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL,
to='dogowner.dogowner')),
('daycare_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='daycare.daycare')),
('dogowner_id',
models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='dogowner.dogowner')),
],
),
]

0 comments on commit 66b04c5

Please sign in to comment.