Mudanza de repo
This commit is contained in:
52
api/record/migrations/0001_initial.py
Normal file
52
api/record/migrations/0001_initial.py
Normal file
@@ -0,0 +1,52 @@
|
||||
# Generated by Django 5.2.3 on 2025-07-14 16:14
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('customs', '0001_initial'),
|
||||
('organization', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='DocumentType',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('nombre', models.CharField(max_length=100, unique=True)),
|
||||
('descripcion', models.TextField(blank=True, null=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Tipo de Documento',
|
||||
'verbose_name_plural': 'Tipos de Documento',
|
||||
'db_table': 'document_type',
|
||||
'ordering': ['nombre'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Document',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
('archivo', models.FileField(max_length=400, upload_to='documents/')),
|
||||
('extension', models.CharField(blank=True, max_length=60, null=True)),
|
||||
('size', models.PositiveIntegerField()),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('organizacion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='organization.organizacion')),
|
||||
('pedimento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='customs.pedimento')),
|
||||
('document_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='record.documenttype')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Document',
|
||||
'verbose_name_plural': 'Documents',
|
||||
'db_table': 'document',
|
||||
'ordering': ['created_at'],
|
||||
},
|
||||
),
|
||||
]
|
||||
33
api/record/migrations/0002_fuente_document_fuente.py
Normal file
33
api/record/migrations/0002_fuente_document_fuente.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# Generated by Django 5.2.3 on 2025-08-12 14:01
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('record', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Fuente',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('nombre', models.CharField(max_length=100, unique=True)),
|
||||
('descripcion', models.TextField(blank=True, null=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Fuente',
|
||||
'verbose_name_plural': 'Fuentes',
|
||||
'db_table': 'fuente',
|
||||
'ordering': ['nombre'],
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='document',
|
||||
name='fuente',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='record.fuente'),
|
||||
),
|
||||
]
|
||||
0
api/record/migrations/__init__.py
Normal file
0
api/record/migrations/__init__.py
Normal file
Reference in New Issue
Block a user