working FileIndex and user Profile pages/settings

This commit is contained in:
2026-08-03 14:13:40 -05:00
parent 85e6241ad4
commit 39e31d3980
17 changed files with 999 additions and 25 deletions
@@ -0,0 +1,36 @@
# Generated by Django 6.0.3 on 2026-08-03 18:14
import django.db.models.deletion
import uuid
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='FileIndex',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
('kind', models.CharField(db_index=True, default='file', max_length=64)),
('stored_path', models.CharField(max_length=1024)),
('original_filename', models.CharField(blank=True, default='', max_length=255)),
('content_type', models.CharField(blank=True, default='', max_length=128)),
('size', models.IntegerField(default=0)),
('md5', models.CharField(db_index=True, max_length=32)),
('created_at', models.DateTimeField(auto_now_add=True)),
('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='files', to=settings.AUTH_USER_MODEL)),
],
options={
'indexes': [models.Index(fields=['owner', 'kind'], name='library_fil_owner_i_c2b465_idx')],
},
),
]