TandoorRecipes/cookbook/migrations/0206_alter_storage_path_homeassistantconfig.py

31 lines
1.4 KiB
Python

# Generated by Django 4.2.7 on 2024-01-10 21:28
import cookbook.models
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('cookbook', '0205_alter_food_fdc_id_alter_propertytype_fdc_id'),
]
operations = [
migrations.CreateModel(
name='HomeAssistantConfig',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=128, validators=[django.core.validators.MinLengthValidator(1)])),
('url', models.URLField(blank=True, help_text='Something like http://homeassistant:8123/api')),
('token', models.CharField(blank=True, max_length=512)),
('todo_entity', models.CharField(default='todo.shopping_list', max_length=128)),
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
('space', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cookbook.space')),
],
bases=(models.Model, cookbook.models.PermissionModelMixin),
),
]