-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adiciona as migrações de banco de dados
- Loading branch information
1 parent
d7f1ced
commit 125b4d0
Showing
2 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Generated by Django 5.0.3 on 2024-03-28 11:53 | ||
|
||
import django.db.models.deletion | ||
import proc.models | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("collection", "0002_remove_websiteconfiguration_api_token_and_more"), | ||
("proc", "0001_initial"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="ProcReport", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"created", | ||
models.DateTimeField( | ||
auto_now_add=True, verbose_name="Creation date" | ||
), | ||
), | ||
( | ||
"updated", | ||
models.DateTimeField( | ||
auto_now=True, verbose_name="Last update date" | ||
), | ||
), | ||
( | ||
"pid", | ||
models.CharField( | ||
blank=True, max_length=23, null=True, verbose_name="PID" | ||
), | ||
), | ||
( | ||
"task_name", | ||
models.CharField( | ||
blank=True, | ||
max_length=32, | ||
null=True, | ||
verbose_name="Procedure name", | ||
), | ||
), | ||
( | ||
"file", | ||
models.FileField( | ||
blank=True, | ||
null=True, | ||
upload_to=proc.models.proc_report_directory_path, | ||
), | ||
), | ||
( | ||
"report_date", | ||
models.CharField( | ||
blank=True, | ||
max_length=34, | ||
null=True, | ||
verbose_name="Identification", | ||
), | ||
), | ||
( | ||
"collection", | ||
models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.SET_NULL, | ||
to="collection.collection", | ||
), | ||
), | ||
( | ||
"creator", | ||
models.ForeignKey( | ||
editable=False, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_creator", | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="Creator", | ||
), | ||
), | ||
( | ||
"updated_by", | ||
models.ForeignKey( | ||
blank=True, | ||
editable=False, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="%(class)s_last_mod_user", | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="Updater", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "Processing report", | ||
"verbose_name_plural": "Processing reports", | ||
"indexes": [ | ||
models.Index(fields=["pid"], name="proc_procre_pid_2ea179_idx"), | ||
models.Index( | ||
fields=["task_name"], name="proc_procre_task_na_33520a_idx" | ||
), | ||
models.Index( | ||
fields=["report_date"], name="proc_procre_report__370dc9_idx" | ||
), | ||
], | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 5.0.3 on 2024-03-28 12:58 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("collection", "0002_remove_websiteconfiguration_api_token_and_more"), | ||
("proc", "0002_procreport"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="procreport", | ||
name="item_type", | ||
field=models.CharField( | ||
blank=True, max_length=16, null=True, verbose_name="Item type" | ||
), | ||
), | ||
migrations.AddIndex( | ||
model_name="procreport", | ||
index=models.Index( | ||
fields=["item_type"], name="proc_procre_item_ty_0b33db_idx" | ||
), | ||
), | ||
] |