"""
Phase 11 — Quick Capture, and the last table in the schema.

Generated by `makemigrations` and left as generated.

**`Capture.user` IS A FOREIGN KEY STRAIGHT TO THE USER**, which no other
feature table has: every other row hangs off a `Page`. That is the whole
feature rather than an inconsistency — there is exactly one inbox per person,
because asking "which Space?" while a thought is still warm is the friction
Quick Capture exists to remove. `models/capture.py` argues it, and
`permissions.py` grew a branch for it.
"""

# Generated by Django 6.0.6 on 2026-09-18 12:37

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('lifey_api', '0009_focus'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Capture',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(blank=True, max_length=300)),
                ('body', models.TextField(blank=True)),
                ('pinned', models.BooleanField(default=False)),
                ('is_sample', models.BooleanField(default=False)),
                ('triaged_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='captures', to='lifey_api.page')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='captures', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at', '-id'],
                'indexes': [models.Index(fields=['user', '-created_at'], name='lifey_api_c_user_id_7e6593_idx')],
            },
        ),
    ]
