Skip to content

Commit

Permalink
Apply black formatting to migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
huangsam committed Jul 11, 2020
1 parent 1b2e8ec commit 596c441
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 19 deletions.
58 changes: 43 additions & 15 deletions places/migrations/0006_auto_20200711_0045.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,54 @@ class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('places', '0005_auto_20200711_0027'),
("places", "0005_auto_20200711_0027"),
]

operations = [
migrations.CreateModel(
name='Review',
name="Review",
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('body', models.TextField()),
('score', models.IntegerField(choices=[(1, 'Terrible'), (2, 'Mediocre'), (3, 'Average'), (4, 'Good'), (5, 'Great')])),
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to=settings.AUTH_USER_MODEL)),
('place', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to='places.Restaurant')),
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("title", models.CharField(max_length=255)),
("body", models.TextField()),
(
"score",
models.IntegerField(
choices=[
(1, "Terrible"),
(2, "Mediocre"),
(3, "Average"),
(4, "Good"),
(5, "Great"),
]
),
),
(
"author",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="reviews",
to=settings.AUTH_USER_MODEL,
),
),
(
"place",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="reviews",
to="places.Restaurant",
),
),
],
options={
'db_table': 'review',
'unique_together': {('place', 'author')},
},
),
migrations.DeleteModel(
name='Rating',
options={"db_table": "review", "unique_together": {("place", "author")},},
),
migrations.DeleteModel(name="Rating",),
]
6 changes: 2 additions & 4 deletions places/migrations/0007_auto_20200711_0104.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
class Migration(migrations.Migration):

dependencies = [
('places', '0006_auto_20200711_0045'),
("places", "0006_auto_20200711_0045"),
]

operations = [
migrations.RenameField(
model_name='review',
old_name='score',
new_name='rating',
model_name="review", old_name="score", new_name="rating",
),
]

0 comments on commit 596c441

Please sign in to comment.