mirror of
https://github.com/MarcZierle/photo-log-backend.git
synced 2025-01-06 06:27:57 +00:00
37 lines
1.4 KiB
Python
Executable File
37 lines
1.4 KiB
Python
Executable File
# Generated by Django 3.2.8 on 2022-01-05 17:12
|
|
|
|
import django.contrib.postgres.fields
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import photo_log.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='PhotoGroup',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=200, unique=True)),
|
|
('date', models.DateField(null=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Photo',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('legacy_id', models.IntegerField(blank=True, null=True, unique=True)),
|
|
('original_image', models.ImageField(upload_to='original_images/')),
|
|
('cropped_image', models.ImageField(blank=True, null=True, upload_to='cropped_images/')),
|
|
('ocr_text', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=50), size=None)),
|
|
('group', models.ForeignKey(default=photo_log.models.get_default_photogroup, on_delete=django.db.models.deletion.SET_DEFAULT, to='photo_log.photogroup')),
|
|
],
|
|
),
|
|
]
|