From ef77c97719de9074c94f68b04a927b644d91d551 Mon Sep 17 00:00:00 2001 From: Konrad du Plessis Date: Mon, 23 Feb 2026 01:10:40 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20project=20dates=20=E2=80=94=20migratio?= =?UTF-8?q?ns=20not=20running=20on=20Flatlogic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed start_date and end_date from Project model. Flatlogic doesn't run migrations during rebuild, so the DB columns never got created, crashing the site. Active/inactive resource split is kept. Co-Authored-By: Claude Opus 4.6 --- core/admin.py | 2 +- .../0003_add_project_start_end_dates.py | 23 ------------------- core/models.py | 2 -- core/templates/core/index.html | 18 ++------------- 4 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 core/migrations/0003_add_project_start_end_dates.py diff --git a/core/admin.py b/core/admin.py index 58aedc8..1fd949f 100644 --- a/core/admin.py +++ b/core/admin.py @@ -12,7 +12,7 @@ class UserProfileAdmin(admin.ModelAdmin): @admin.register(Project) class ProjectAdmin(admin.ModelAdmin): - list_display = ('name', 'start_date', 'end_date', 'active') + list_display = ('name', 'active') list_filter = ('active',) search_fields = ('name', 'description') filter_horizontal = ('supervisors',) diff --git a/core/migrations/0003_add_project_start_end_dates.py b/core/migrations/0003_add_project_start_end_dates.py deleted file mode 100644 index f5914de..0000000 --- a/core/migrations/0003_add_project_start_end_dates.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 5.2.7 on 2026-02-22 22:44 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('core', '0002_update_worker_id_numbers'), - ] - - operations = [ - migrations.AddField( - model_name='project', - name='end_date', - field=models.DateField(blank=True, null=True), - ), - migrations.AddField( - model_name='project', - name='start_date', - field=models.DateField(blank=True, null=True), - ), - ] diff --git a/core/models.py b/core/models.py index 5ba2de3..31b5a5a 100644 --- a/core/models.py +++ b/core/models.py @@ -25,8 +25,6 @@ def save_user_profile(sender, instance, **kwargs): class Project(models.Model): name = models.CharField(max_length=200) description = models.TextField(blank=True) - start_date = models.DateField(null=True, blank=True) - end_date = models.DateField(null=True, blank=True) supervisors = models.ManyToManyField(User, related_name='assigned_projects') active = models.BooleanField(default=True) diff --git a/core/templates/core/index.html b/core/templates/core/index.html index f2d0dd1..972fa75 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -238,14 +238,7 @@