File size: 1,902 Bytes
4847e7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Generated by Django 5.2.1 on 2026-01-24 07:46

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('source', models.TextField()),
                ('page_url', models.TextField(db_index=True)),
                ('embedding', models.TextField(help_text='Vector embedding stored as JSON array')),
                ('hash', models.TextField(db_index=True, unique=True)),
            ],
            options={
                'db_table': 'documents',
                'indexes': [models.Index(fields=['page_url'], name='documents_page_ur_4ef9a2_idx'), models.Index(fields=['hash'], name='documents_hash_72cbe4_idx')],
            },
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.TextField(db_index=True, unique=True)),
                ('tenant_id', models.TextField(db_index=True)),
                ('content_hash', models.TextField()),
                ('is_active', models.BooleanField(db_index=True, default=True)),
                ('last_indexed', models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'db_table': 'pages',
                'indexes': [models.Index(fields=['tenant_id', 'is_active'], name='pages_tenant__b02857_idx'), models.Index(fields=['url'], name='pages_url_f5ef97_idx')],
            },
        ),
    ]