From 9f47afd4e56ad79006904efcad5d6e69a7df399c Mon Sep 17 00:00:00 2001 From: Jesse Zong Date: Tue, 5 Mar 2024 16:44:53 -0500 Subject: [PATCH] Alter baths to be 1-point decimal --- .../migrations/0003_alter_sublet_baths.py | 18 ++++++++++++++++++ backend/sublet/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 backend/sublet/migrations/0003_alter_sublet_baths.py diff --git a/backend/sublet/migrations/0003_alter_sublet_baths.py b/backend/sublet/migrations/0003_alter_sublet_baths.py new file mode 100644 index 00000000..7f8b65b9 --- /dev/null +++ b/backend/sublet/migrations/0003_alter_sublet_baths.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.9 on 2024-03-05 21:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("sublet", "0002_auto_20240209_1649"), + ] + + operations = [ + migrations.AlterField( + model_name="sublet", + name="baths", + field=models.DecimalField(blank=True, decimal_places=1, max_digits=3, null=True), + ), + ] diff --git a/backend/sublet/models.py b/backend/sublet/models.py index 0a8c1bc7..747634c3 100644 --- a/backend/sublet/models.py +++ b/backend/sublet/models.py @@ -39,7 +39,7 @@ class Sublet(models.Model): title = models.CharField(max_length=255) address = models.CharField(max_length=255, null=True, blank=True) beds = models.IntegerField(null=True, blank=True) - baths = models.IntegerField(null=True, blank=True) + baths = models.DecimalField(max_digits=3, decimal_places=1, null=True, blank=True) description = models.TextField(null=True, blank=True) external_link = models.URLField(max_length=255) price = models.IntegerField()