[elixir] colums defined by users

0 views
Skip to first unread message

César Fernández Rodríguez

unread,
Nov 17, 2009, 5:33:04 AM11/17/09
to sqle...@googlegroups.com
Hi, i'm trying to gave the user of my program the ability of adding new
columns, giving a name and selecting the type from a set of values, for
example Unicode (with a custom length), UnicodeText, Integer or Boolean.
The database is very simple, just one table with some columns, students
with their names and some other columns.

Here is the original definition:

class Student(Entity):
id_external_program=Field(Integer, unique=True)
name=Field(Unicode(150))
firstname=Field(Unicode(150))
street=Field(Unicode(150))
dni=Field(Unicode(9), unique=True)


I can't find any example about this stuff in elixir documentation or in
their examples.

Thanks in advance.

--
_________________________________________
CONFIDENCIALIDAD

La información contenida en este mensaje y/o archivo(s) adjunto(s) es
confidencial/privilegiada y está destinada a ser leída sólo por la(s)
persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es el
destinatario señalado, el empleado o el agente responsable de entregar
el mensaje al destinatario, o ha recibido esta comunicación por error,
le informamos que está totalmente prohibida, y puede ser ilegal,
cualquier divulgación, distribución o reproducción de esta comunicación,
y le rogamos que nos lo notifique inmediatamente y nos devuelva el
mensaje original a la dirección arriba mencionada.

Virus: Aunque hemos tomado las medidas para asegurarnos que este correo
electrónico y sus ficheros adjuntos están libres de virus, le
recomendamos que a efectos de mantener buenas prácticas de seguridad, el
receptor debe asegurarse que este correo y sus ficheros adjuntos están
libres de virus.

Gaetan de Menten

unread,
Nov 17, 2009, 5:58:58 AM11/17/09
to sqle...@googlegroups.com
2009/11/17 César Fernández Rodríguez <ces...@hsoluciones.com>:

>
> Hi, i'm trying to gave the user of my program the ability of adding new
> columns, giving a name and selecting the type from a set of values, for
> example Unicode (with a custom length), UnicodeText, Integer or Boolean.

Out of the box, SQLAlchemy does not support any form of table
alteration once they are created. You might want to look at
sqlalchemy-migrate which adds such functionality (if the underlying
database supports it).

--
Gaëtan de Menten
http://openhex.org

ces...@hsoluciones.com

unread,
Nov 17, 2009, 7:13:16 AM11/17/09
to sqle...@googlegroups.com
On Tue, 17 Nov 2009 11:58:58 +0100, Gaetan de Menten <gdem...@gmail.com>
wrote:
Ok, thank you for the quick answer, i'll take a look at sqlalchemy-migrate.
Reply all
Reply to author
Forward
0 new messages