This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
django-stock/tea/migrations/0001_initial.py

42 lines
2.1 KiB
Python

# Generated by Django 4.0.2 on 2022-02-05 22:02
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Company',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('website', models.CharField(max_length=200)),
],
),
migrations.CreateModel(
name='Tea',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('tea_type', models.CharField(choices=[('infusion', 'Infusion'), ('black-tea', 'Thé noir'), ('green-tea', 'Thé vert'), ('white-tea', 'Thé blanc'), ('rooibos', 'Rooibos'), ('fruit', 'Tisane aux fruits'), ('mate', 'Maté')], max_length=20)),
('conditioning', models.CharField(choices=[('loose', 'En vrac'), ('bag', 'En sachet')], max_length=20)),
('ingredients', models.TextField(max_length=1024)),
('tea_quantity', models.DecimalField(blank=True, decimal_places=1, max_digits=5, null=True)),
('tea_quantity_type', models.CharField(choices=[('cs-l', 'cs/lt'), ('cc-dl', 'cc/dl'), ('cc-l', 'cc/lt'), ('pc-l', 'pc/lt')], default='cc-l', max_length=20)),
('tea_time_from', models.PositiveSmallIntegerField()),
('tea_time_to', models.PositiveSmallIntegerField()),
('tea_time_type', models.CharField(choices=[('min', 'min')], default='min', max_length=20)),
('url', models.URLField(blank=True, max_length=1024, null=True)),
('available', models.BooleanField()),
('comment', models.TextField(blank=True, null=True)),
('company', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='tea.company')),
],
),
]