text: # Generated by Django 3.0.6 on 2020-05-15 17:30
  
  import datetime
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Photograph',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('image', models.ImageField(help_text='The image to display everywhere (cropped)', upload_to='images/%Y/%m/')),
                  ('full_resolution_image', models.ImageField(help_text='A full resolution copy of the image for close up looks', null=True, upload_to='images/fullres/%Y/%m/')),
                  ('title', models.CharField(blank=True, max_length=100)),
                  ('notes', models.TextField(blank=True, help_text='optional markdown notes on the image')),
                  ('notes_cache', models.TextField(blank=True, help_text='md cache of the notes field')),
                  ('uploaded_at', models.DateField(default=datetime.date.today, editable=False, help_text='Date of creation')),
                  ('uploaded_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'ordering': ['uploaded_at'],
              },
          ),
          migrations.CreateModel(
              name='Item',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(help_text='The name of the container', max_length=100)),
                  ('notes', models.TextField(blank=True, help_text='Thoughts on the container')),
                  ('notes_cache', models.TextField(blank=True, help_text='md chache of the notes field')),
                  ('visible_to_others', models.BooleanField(default=True, help_text='If this is set to false only the owner can see this container. Even if it is set to true only members of his peer group can see this container')),
                  ('created_at', models.DateField(default=datetime.date.today, editable=False, help_text='Date of creation')),
                  ('is_container', models.BooleanField(default=False, help_text='If true this item can contain other items.')),
                  ('can_be_lend_alone', models.BooleanField(default=True, help_text='If false one can only lend the parent container.')),
                  ('images', models.ManyToManyField(to='equipment.Photograph')),
                  ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                  ('parent_container', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='equipment.Item')),
              ],
          ),
      ]
  