[Lift] Re: Extend the tables that like the migration in the Rails ?

2009-10-13 Thread David Pollak
Schemifier only adds, it does not remove. You have to do destructive operations manually. However, you can register for callbacks on column adds (e.g., MappedField.dbAddedColumn). You could use this function to look for an existing column that needs to be removed. On Mon, Oct 12, 2009 at 7:46

[Lift] Re: Extend the tables that like the migration in the Rails ?

2009-10-12 Thread Peter Robinett
Is User added to Schemefier in Boot.scala? It should look something like: Schemifier.schemify(true, Log.infoF _, User) Peter Robinett On Oct 12, 11:22 am, Neil.Lv anim...@gmail.com wrote: Hi all,    I don't know whether there is a mechanism that like the migration of the Rails in the

[Lift] Re: Extend the tables that like the migration in the Rails ?

2009-10-12 Thread Neil.Lv
Yeah, I have add this code in the Boot.scala. ### Schemifier.schemify(true, Log.infoF _, User) ### But i want to add a column into the user table (extend the user table) now, and how can i achieve this purpose. Ex: ### Original user table like this idemail first_name last_name

[Lift] Re: Extend the tables that like the migration in the Rails ?

2009-10-12 Thread David Pollak
Just add the column to the User model. Schemifier will add the column to the RDBMS. On Mon, Oct 12, 2009 at 6:20 PM, Neil.Lv anim...@gmail.com wrote: Yeah, I have add this code in the Boot.scala. ### Schemifier.schemify(true, Log.infoF _, User) ### But i want to add a column into the

[Lift] Re: Extend the tables that like the migration in the Rails ?

2009-10-12 Thread Neil.Lv
Yeah, I see it now, and it works ! 1): ### I add a column in the User model, like this class User extends MegaProtoUser[User] { ... /* add column dos4 */ object dos4 extends MappedBoolean(this) ... } result: INFO - ALTER TABLE users ADD COLUMN do4 SMALLINT ###