Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Marta Miranda
/
boletin_api
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Enzo Yair
2023-09-27 11:14:49 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3b5550352371305274d23d3c463f9c442ba0d903
3b555035
1 parent
6c9eb8bc
migracion inicial
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
211 deletions
project/apps/edicto/migrations/0001_initial.py
project/apps/edicto/migrations/0002_remove_edicto_uuid_edicto_id.py
project/apps/edicto/migrations/0003_edicto_uuid.py
project/apps/edicto/migrations/0004_migracion_dato_uuid.py
project/apps/edicto/migrations/0005_alter_edicto_creado_por.py
project/apps/edicto/migrations/0001_initial.py
View file @
3b55503
# Generated by Django 4.1.9 on 2023-09-2
1 13:18
# Generated by Django 4.1.9 on 2023-09-2
7 14:12
from
django.conf
import
settings
from
django.db
import
migrations
,
models
...
...
@@ -7,6 +7,7 @@ import uuid
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
...
...
@@ -15,141 +16,58 @@ class Migration(migrations.Migration):
operations
=
[
migrations
.
CreateModel
(
name
=
"Precio"
,
name
=
'Precio'
,
fields
=
[
(
"id"
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
"ID"
,
),
),
(
"precio"
,
models
.
FloatField
(
max_length
=
50
)),
(
"vigencia_desde"
,
models
.
DateField
()),
(
"vigencia_hasta"
,
models
.
DateField
(
blank
=
True
,
null
=
True
)),
(
"moneda"
,
models
.
CharField
(
choices
=
[
(
"peso_argentino"
,
"peso_argentino"
),
(
"dolar"
,
"dolar"
),
(
"euro"
,
"euro"
),
],
default
=
"peso_argentino"
,
max_length
=
50
,
),
),
(
"precio_ejemplar"
,
models
.
FloatField
(
max_length
=
50
)),
(
"usuario"
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
,
),
),
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'precio'
,
models
.
FloatField
(
max_length
=
50
)),
(
'vigencia_desde'
,
models
.
DateField
()),
(
'vigencia_hasta'
,
models
.
DateField
(
blank
=
True
,
null
=
True
)),
(
'moneda'
,
models
.
CharField
(
choices
=
[(
'peso_argentino'
,
'peso_argentino'
),
(
'dolar'
,
'dolar'
),
(
'euro'
,
'euro'
)],
default
=
'peso_argentino'
,
max_length
=
50
)),
(
'precio_ejemplar'
,
models
.
FloatField
(
max_length
=
50
)),
(
'usuario'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
options
=
{
"verbose_name"
:
"Precio"
,
"verbose_name_plural"
:
"Precios"
,
'verbose_name'
:
'Precio'
,
'verbose_name_plural'
:
'Precios'
,
},
),
migrations
.
CreateModel
(
name
=
"Edicto"
,
name
=
'Edicto'
,
fields
=
[
(
"uuid"
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
primary_key
=
True
,
serialize
=
False
,
unique
=
True
,
),
),
(
"cuerpo_edicto"
,
models
.
TextField
()),
(
"archivo"
,
models
.
FileField
(
upload_to
=
"uploads/
%
Y/
%
m/
%
d/"
)),
(
"dias_publicar"
,
models
.
PositiveIntegerField
()),
(
"cantidad_sellos"
,
models
.
PositiveIntegerField
()),
(
"estado"
,
models
.
CharField
(
choices
=
[
(
"iniciado"
,
"iniciado"
),
(
"pendiente_revision"
,
"pendiente_revision"
),
(
"pendiente_de_pago"
,
"pendiente_de_pago"
),
(
"pendiente_pago_revision"
,
"pendiente_pago_revision"
),
(
"publicado"
,
"publicado"
),
(
"aprobado"
,
"aprobado"
),
(
"rechazado"
,
"rechazado"
),
],
default
=
"inciado"
,
max_length
=
23
,
),
),
(
"cantidad_palabras"
,
models
.
IntegerField
(
editable
=
False
)),
(
"cantidad_copias"
,
models
.
PositiveIntegerField
()),
(
"observaciones"
,
models
.
CharField
(
blank
=
True
,
max_length
=
500
)),
(
"fecha_publicacion"
,
models
.
DateField
(
blank
=
True
,
null
=
True
)),
(
"fecha_creacion"
,
models
.
DateField
(
auto_now_add
=
True
)),
(
"fecha_modificacion"
,
models
.
DateTimeField
(
auto_now
=
True
)),
(
"creado_por"
,
models
.
ForeignKey
(
editable
=
False
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
,
verbose_name
=
"Usuario"
,
),
),
(
"modificado_por"
,
models
.
ForeignKey
(
editable
=
False
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"update_edicto"
,
to
=
settings
.
AUTH_USER_MODEL
,
),
),
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'uuid'
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
unique
=
True
)),
(
'cuerpo_edicto'
,
models
.
TextField
()),
(
'archivo'
,
models
.
FileField
(
upload_to
=
'uploads/
%
Y/
%
m/
%
d/'
)),
(
'dias_publicar'
,
models
.
PositiveIntegerField
()),
(
'cantidad_sellos'
,
models
.
PositiveIntegerField
()),
(
'estado'
,
models
.
CharField
(
choices
=
[(
'iniciado'
,
'iniciado'
),
(
'pendiente_revision'
,
'pendiente_revision'
),
(
'pendiente_de_pago'
,
'pendiente_de_pago'
),
(
'pendiente_pago_revision'
,
'pendiente_pago_revision'
),
(
'publicado'
,
'publicado'
),
(
'aprobado'
,
'aprobado'
),
(
'rechazado'
,
'rechazado'
)],
default
=
'inciado'
,
max_length
=
23
)),
(
'cantidad_palabras'
,
models
.
IntegerField
(
editable
=
False
)),
(
'cantidad_copias'
,
models
.
PositiveIntegerField
()),
(
'observaciones'
,
models
.
CharField
(
blank
=
True
,
max_length
=
500
)),
(
'fecha_publicacion'
,
models
.
DateField
(
blank
=
True
,
null
=
True
)),
(
'fecha_creacion'
,
models
.
DateField
(
auto_now_add
=
True
)),
(
'fecha_modificacion'
,
models
.
DateTimeField
(
auto_now
=
True
)),
(
'creado_por'
,
models
.
ForeignKey
(
editable
=
False
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
(
'modificado_por'
,
models
.
ForeignKey
(
editable
=
False
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'update_edicto'
,
to
=
settings
.
AUTH_USER_MODEL
)),
],
options
=
{
"verbose_name"
:
"Edicto"
,
"verbose_name_plural"
:
"Edictos"
,
'verbose_name'
:
'Edicto'
,
'verbose_name_plural'
:
'Edictos'
,
},
),
migrations
.
CreateModel
(
name
=
"ComprobantePago"
,
name
=
'ComprobantePago'
,
fields
=
[
(
"id"
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
"ID"
,
),
),
(
"monto"
,
models
.
FloatField
()),
(
"numero_comprobante"
,
models
.
CharField
(
blank
=
True
,
max_length
=
300
,
null
=
True
),
),
(
"fecha_pago"
,
models
.
DateTimeField
(
blank
=
True
,
null
=
True
)),
(
"archivo"
,
models
.
FileField
(
blank
=
True
,
upload_to
=
"uploads/
%
Y/
%
m/
%
d/"
),
),
(
"edicto"
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
"edicto.edicto"
),
),
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'monto'
,
models
.
FloatField
()),
(
'numero_comprobante'
,
models
.
CharField
(
blank
=
True
,
max_length
=
300
,
null
=
True
)),
(
'fecha_pago'
,
models
.
DateTimeField
(
blank
=
True
,
null
=
True
)),
(
'archivo'
,
models
.
FileField
(
blank
=
True
,
upload_to
=
'uploads/
%
Y/
%
m/
%
d/'
)),
(
'edicto'
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'edicto.edicto'
)),
],
options
=
{
"verbose_name"
:
"ComprobantePago"
,
"verbose_name_plural"
:
"ComprobantesPagos"
,
'verbose_name'
:
'ComprobantePago'
,
'verbose_name_plural'
:
'ComprobantesPagos'
,
},
),
]
...
...
project/apps/edicto/migrations/0002_remove_edicto_uuid_edicto_id.py
deleted
100644 → 0
View file @
6c9eb8b
# Generated by Django 4.1.9 on 2023-09-25 11:23
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'edicto'
,
'0001_initial'
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
'edicto'
,
name
=
'uuid'
,
),
migrations
.
AddField
(
model_name
=
'edicto'
,
name
=
'id'
,
field
=
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
),
preserve_default
=
False
,
),
]
project/apps/edicto/migrations/0003_edicto_uuid.py
deleted
100644 → 0
View file @
6c9eb8b
# Generated by Django 4.1.9 on 2023-09-25 11:29
from
django.db
import
migrations
,
models
import
uuid
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'edicto'
,
'0002_remove_edicto_uuid_edicto_id'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'edicto'
,
name
=
'uuid'
,
field
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
null
=
True
,
unique
=
True
),
),
]
project/apps/edicto/migrations/0004_migracion_dato_uuid.py
deleted
100644 → 0
View file @
6c9eb8b
# Generated by Django 4.1.9 on 2023-09-25 11:35
from
django.db
import
migrations
,
models
import
uuid
def
migrar_datos_uuid
(
apps
,
schema
):
Edictos
=
apps
.
get_model
(
'edicto'
,
'Edicto'
)
for
edicto
in
Edictos
.
objects
.
all
():
edicto
.
uuid
=
uuid
.
uuid4
()
edicto
.
save
()
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'edicto'
,
'0003_edicto_uuid'
),
]
operations
=
[
migrations
.
RunPython
(
migrar_datos_uuid
,
reverse_code
=
migrations
.
RunPython
.
noop
),
migrations
.
AlterField
(
model_name
=
'edicto'
,
name
=
'uuid'
,
field
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
unique
=
True
),
),
]
project/apps/edicto/migrations/0005_alter_edicto_creado_por.py
deleted
100644 → 0
View file @
6c9eb8b
# Generated by Django 4.1.9 on 2023-09-27 13:27
from
django.conf
import
settings
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
(
'edicto'
,
'0004_migracion_dato_uuid'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'edicto'
,
name
=
'creado_por'
,
field
=
models
.
ForeignKey
(
editable
=
False
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
),
),
]
Please
register
or
login
to post a comment