30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
# Generated by Django 4.2.7 on 2023-11-18 11:28
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import files.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('inventory', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='File',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('created_at', models.DateTimeField(blank=True, null=True)),
|
|
('updated_at', models.DateTimeField(blank=True, null=True)),
|
|
('deleted_at', models.DateTimeField(blank=True, null=True)),
|
|
('file', models.ImageField(upload_to=files.models.hash_upload)),
|
|
('mime_type', models.CharField(max_length=255)),
|
|
('hash', models.CharField(max_length=64, unique=True)),
|
|
('item', models.ForeignKey(blank=True, db_column='iid', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='files', to='inventory.item')),
|
|
],
|
|
),
|
|
]
|