DocManagerBackend/docmanager_backend/documents/migrations/0001_initial.py

56 lines
1.6 KiB
Python
Raw Normal View History

2024-11-24 02:20:18 +08:00
# Generated by Django 5.1.3 on 2024-11-23 17:01
2024-11-23 23:02:52 +08:00
import django.utils.timezone
2024-11-24 02:20:18 +08:00
import documents.models
2024-11-23 23:02:52 +08:00
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Document",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=100)),
(
"document_type",
models.CharField(
choices=[
("pdf", "PDF"),
("image", "Image"),
("video", "Video"),
("doc", "Word Document"),
("excel", "Excel Document"),
("ppt", "Powerpoint Document"),
],
max_length=32,
),
),
2024-11-24 02:20:18 +08:00
("number_pages", models.IntegerField()),
(
"file",
models.FileField(upload_to=documents.models.Document.upload_to),
),
2024-11-23 23:02:52 +08:00
(
"date_uploaded",
models.DateTimeField(
default=django.utils.timezone.now, editable=False
),
),
],
),
]