> I find the migrations to not work that well and fail silently.

there is one catch with migrations. If you use sqlite, you cannot
change the type of field because sqlite will accept but will not
actually change the column type. It is because sqlite has limited
ALTER TABLE support.

Massimo

>
> Overall, I'm loving web2py and growing to appreciate Python.
>
> On Nov 18, 2010, at 15:12 , mdipierro wrote:
>
>
>
> > As a rails user, would you share your experience with web2py so far?
> > What you like, what you do not, what you think rails is better at?
> > We'll defend ourselves but not take any offense. This can help us
> > improve.
>
> > Massimo
>
> > On Nov 18, 2:47 pm, Lorin Rivers <lriv...@mosasaur.com> wrote:
> >> They are not set to false.
>
> >> I'm coming from a slight rails perspective (some experience with it). In 
> >> rails, migrations are sequential. If you want to add a field to a table, 
> >> you create a new migration that only does that.
>
> >> Regarding my question, then, do most people just edit the model (i.e., add 
> >> a field, change a field's type, and so on)?
>
> >> On Nov 18, 2010, at 14:29 , VP wrote:
>
> >>> Unless you have migration set to False, these things should be
> >>> automatic.
>
> >>> On Nov 18, 1:53 pm, Lorin Rivers <lriv...@mosasaur.com> wrote:
> >>>> My database is PostgreSQL
>
> >>>> I have tables defined in my ../models/db.py
>
> >>>> Now I want to add some fields to one of the tables defined there. The 
> >>>> table has data in it already.
>
> >>>> I tried modifying the original table definition but that didn't actually 
> >>>> change the table's structure.
>
> >>>> Where should I make these changes? I have a model (rounding.py) that 
> >>>> creates a new table in the database defined in db.py. That worked after 
> >>>> some finagling (I think I had to drop the table and have the model 
> >>>> recreate it, but it didn't have data yet).
>
> >>>> So what is the best method for making incremental changes to databases?
>
> >>>> I'm stuck and need some help.
>
> >>>> --
> >>>> Lorin Rivers
> >>>> Mosasaur: Killer Technical Marketing <http://www.mosasaur.com>
> >>>> <mailto:lriv...@mosasaur.com>
> >>>> 512/203.3198 (m)
>
> >> --
> >> Lorin Rivers
> >> Mosasaur: Killer Technical Marketing <http://www.mosasaur.com>
> >> <mailto:lriv...@mosasaur.com>
> >> 512/203.3198 (m)
>
> --
> Lorin Rivers
> Mosasaur: Killer Technical Marketing <http://www.mosasaur.com>
> <mailto:lriv...@mosasaur.com>
> 512/203.3198 (m)

Reply via email to