31 lines
1.3 KiB
Python
31 lines
1.3 KiB
Python
import uuid
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('downloader', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='DownloadJob',
|
|
fields=[
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('status', models.CharField(
|
|
choices=[('pending', 'Pending'), ('processing', 'Processing'), ('done', 'Done'), ('error', 'Error')],
|
|
default='pending', max_length=20,
|
|
)),
|
|
('message', models.CharField(blank=True, default='', max_length=500)),
|
|
('file_path', models.CharField(blank=True, default='', max_length=1000)),
|
|
('filename', models.CharField(blank=True, default='', max_length=500)),
|
|
('content_type', models.CharField(blank=True, default='application/octet-stream', max_length=100)),
|
|
('file_size', models.BigIntegerField(blank=True, null=True)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={'ordering': ['-created_at']},
|
|
),
|
|
]
|