# Generated by Django 5.1.2 on 2024-10-26 09:06

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Session",
            fields=[
                ("session_id", models.AutoField(primary_key=True, serialize=False)),
                ("db_connection_uri", models.URLField()),
                ("session_name", models.CharField(max_length=255, unique=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("base_url", models.URLField()),
                ("session_db_path", models.CharField(max_length=255)),
            ],
            options={
                "ordering": ["created_at"],
            },
        ),
        migrations.CreateModel(
            name="Completions",
            fields=[
                ("chat_id", models.AutoField(primary_key=True, serialize=False)),
                ("message_id", models.IntegerField(blank=True, null=True)),
                ("session_name", models.CharField(max_length=255)),
                ("created_at", models.DateTimeField()),
                ("question", models.TextField(blank=True, null=True)),
                (
                    "session",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="messages",
                        to="api.session",
                    ),
                ),
            ],
            options={
                "verbose_name_plural": "Completions",
                "ordering": ["-created_at"],
            },
        ),
    ]
