Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration de Movimientos #34

Open
eamanu opened this issue Jun 16, 2021 · 0 comments
Open

Migration de Movimientos #34

eamanu opened this issue Jun 16, 2021 · 0 comments

Comments

@eamanu
Copy link
Collaborator

eamanu commented Jun 16, 2021

Leyendo un poco la documentación [0] observo que el argumento migrate
del metodo pydal.DAL.define_table() debería ser un booleano.

Por lo que está linea https://github.com/PyAr/OpenLex/blob/master/models/db_pydoctor.py#L242 está haciendo que
no se ejecute la migración por lo tanto a la hora de crear un movimiento tengo el siguiente error:

image

Esto lo soluciona

diff --git a/models/db_pydoctor.py b/models/db_pydoctor.py
index f987621..aba8746 100644
--- a/models/db_pydoctor.py
+++ b/models/db_pydoctor.py
@@ -239,7 +239,7 @@ db.define_table(
     singular=T("Movimiento"),
     plural=T("Movimientos"),
     format='%(titulo)s',
-    migrate='movimiento.table')
+    migrate=True)
 db.movimiento.id.readable = db.movimiento.id.writable = False
 # python web2py.py -S PyDoctor -M

[0] https://pydal.readthedocs.io/en/latest/_modules/pydal/base.html?highlight=migrate

cc: @marian-vignau @Juerodriguez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant