# Generated by Django 2.2.26 on 2022-12-08 16:05

import django.contrib.postgres.fields.jsonb
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('toulouse_maelis', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Referential',
            fields=[
                (
                    'id',
                    models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
                ),
                ('referential_name', models.CharField(max_length=64, verbose_name='Name')),
                ('item_id', models.CharField(max_length=64, verbose_name='Key')),
                ('item_text', models.CharField(max_length=128, verbose_name='Text')),
                ('item_data', django.contrib.postgres.fields.jsonb.JSONField(verbose_name='Data')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')),
                (
                    'resource',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name='referential',
                        to='toulouse_maelis.ToulouseMaelis',
                        verbose_name='Resource',
                    ),
                ),
            ],
            options={
                'ordering': ('referential_name', 'item_text', 'item_id'),
                'unique_together': {('referential_name', 'item_id')},
            },
        ),
    ]
