Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

2.0 KB
Raw Blame
# Generated by Django 4.2.30 on 2026-10-21 06:46

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


class Migration(migrations.Migration):
    dependencies = [
        ("account_v2", "0008_organization_capability_settings"),
    ]

    operations = [
        migrations.CreateModel(
            name="UserProductPreference",
            fields=[
                (
                    "user",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        primary_key=True,
                        related_name="product_preference",
                        serialize=False,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "product",
                    models.CharField(
                        choices=[
                            ("unstract", "Unstract"),
                            ("llm-whisperer", "LLMWhisperer"),
                            ("verticals", "API Hub"),
                            ("flow", "Flow"),
                        ],
                        db_comment="Product id the user last used, e.g. unstract or llm-whisperer",
                        max_length=32,
                    ),
                ),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
            options={
                "verbose_name": "User Product Preference",
                "verbose_name_plural": "User Product Preferences",
                "db_table": "user_product_preference",
            },
        ),
        migrations.AddConstraint(
            model_name="userproductpreference",
            constraint=models.CheckConstraint(
                check=models.Q(
                    ("product__in", ["unstract", "llm-whisperer", "verticals", "flow"])
                ),
                name="user_product_preference_product_valid",
            ),
        ),
    ]