# Generated by Django 4.2.13 on 2024-07-05 18:59

from django.db import migrations, models
import uuid

from smartdoc.const import CONFIG


class Migration(migrations.Migration):
    dependencies = [
        ('dataset', '0004_document_directly_return_similarity'),
    ]

    operations = [
        migrations.RunSQL(f"grant execute on function lo_from_bytea to {CONFIG.get('DB_USER')}"),
        migrations.CreateModel(
            name='File',
            fields=[
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('id', models.UUIDField(default=uuid.uuid1, editable=False, primary_key=True, serialize=False,
                                        verbose_name='主键id')),
                ('file_name', models.CharField(default='', max_length=256, verbose_name='文件名称')),
                ('loid', models.IntegerField(verbose_name='loid')),
            ],
            options={
                'db_table': 'file',
            },
        ),
    ]
