Hi and thanks for your replies. Unfortunately I still haven't cleared
the problem. I blame my lack of expressiveness so I would like to
invite you to analyze my rephrase.
So here we go... Is there a way to force elixir to modify the existing
DB schema according to the modifications made on the models?
Concrete example:
Initially I had this model.
class User(Entity):
name=Field(String,required=True)
Later, I realized that it would be nice to have a unique constraint on
the name, so I changed it to
class User(Entity):
name=Field(String, required=True, unique=True)
All I want to know is if Elixir/SQLAlchemy makes it easy for me to
resync the DB with the modified model. One solution would be to
manually change the column definition in Postgresql (the dbms I'm
using), but I really believe there is a more elegant one.
Thank you!
On Nov 6, 11:40 am, "Gaetan de Menten" <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 5, 2008 at 15:32, Etienne Robillard
>
> <[EMAIL PROTECTED]> wrote:
>
> > On November 5, 2008 07:48:10 am Mihai wrote:
> >> Hi,
>
> >> I just want to know what is the standard "move" when it comes to
> >> changing the model and the DB schema according to it. For example I
> >> want to to change a field from created_on=Field(Date, required=True)
> >> into created_on=Field(Date).
>
> >> Thanks,
> >> Mihai
>
> > I'd take a look in $ELIXIR_ROOT/tests/test_versioning.py... :)
>
> Hmm, no this is unrelated. Elixir versioning extension is to keep
> track of data changes, not schema/metadata changes.
>
> There are several solutions to do what you want. One of them
> is:http://code.google.com/p/sqlalchemy-migrate/
>
> There are other projects too, but I can't remember what they are called.
>
> http://code.google.com/p/sqlalchemy-migrate/
>
> --
> Gaëtan de Mentenhttp://openhex.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---