forked from wiktor/spejstore-new
83 lines
3.2 KiB
Python
83 lines
3.2 KiB
Python
|
# -*- coding: utf-8 -*-
|
||
|
# Generated by Django 1.10.1 on 2016-09-29 22:03
|
||
|
from __future__ import unicode_literals
|
||
|
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
import django_hstore.fields
|
||
|
import uuid
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
replaces = [('storage', '0001_initial'), ('storage', '0002_auto_20160929_2125'), ('storage', '0003_auto_20160929_2134'), ('storage', '0004_auto_20160929_2143'), ('storage', '0005_auto_20160929_2151'), ('storage', '0006_auto_20160929_2153'), ('storage', '0007_auto_20160929_2153'), ('storage', '0008_item_state')]
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Item',
|
||
|
fields=[
|
||
|
('name', models.TextField()),
|
||
|
('description', models.TextField(blank=True)),
|
||
|
('props', django_hstore.fields.DictionaryField()),
|
||
|
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='ItemImage',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('image', models.ImageField(upload_to='')),
|
||
|
('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='storage.Item')),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Category',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=127)),
|
||
|
],
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='item',
|
||
|
name='categories',
|
||
|
field=models.ManyToManyField(to='storage.Category'),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='item',
|
||
|
name='owner',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='owned_items', to=settings.AUTH_USER_MODEL),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='item',
|
||
|
name='taken_by',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='taken_items', to=settings.AUTH_USER_MODEL),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='item',
|
||
|
name='taken_on',
|
||
|
field=models.DateTimeField(blank=True, null=True),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='item',
|
||
|
name='taken_until',
|
||
|
field=models.DateTimeField(blank=True, null=True),
|
||
|
),
|
||
|
migrations.AlterField(
|
||
|
model_name='item',
|
||
|
name='description',
|
||
|
field=models.TextField(blank=True, null=True),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='item',
|
||
|
name='state',
|
||
|
field=models.CharField(choices=[('present', 'Present'), ('taken', 'Taken'), ('broken', 'Broken'), ('missing', 'Missing')], default='present', max_length=31),
|
||
|
),
|
||
|
]
|