- Remove user ForeignKey from all 7 models (single-user app) - Update all views, handlers, forms, admin, API, seed, and tests - Add MonthlyGoal model with goals and promises sections - Goals/promises: add, toggle (strikethrough), delete via LiveView
53 lines
1.2 KiB
Python
53 lines
1.2 KiB
Python
# Generated by Django 6.0 on 2026-03-18 14:06
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("monthly", "0004_monthlynote_savings_target"),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="MonthlyGoal",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("year", models.PositiveIntegerField()),
|
|
("month", models.PositiveSmallIntegerField()),
|
|
("text", models.CharField(max_length=500)),
|
|
(
|
|
"kind",
|
|
models.CharField(
|
|
choices=[("goal", "Goal"), ("promise", "Promise")],
|
|
max_length=10,
|
|
),
|
|
),
|
|
("done", models.BooleanField(default=False)),
|
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
|
(
|
|
"user",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="monthly_goals",
|
|
to=settings.AUTH_USER_MODEL,
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"ordering": ["created_at"],
|
|
},
|
|
),
|
|
]
|