Nope.  On step 2, when I run "python web2py ...", I get no errors at
all.  It updates the .table file and sql.log, does not change the DB,
and gives me no errors.

On Jan 6, 7:30 am, mdipierro <[email protected]> wrote:
> Did you get any operational error at all?
>
> On Jan 6, 3:00 am, Michael Toomim <[email protected]> wrote:
>
>
>
> > I'm using hg tip and can't add a column to a table. It figures out
> > what to do, but doesn't alter the postgresql database. Then any
> > commands that need to use that column fail.
>
> > It was able to create the table in the first place, but cannot add a
> > column now that the table has been created. How should I debug this?
>
> > Here's more detail:
>
> > == Step 1 ==
>
> > db.py:
>
> >       db.define_table('hits_log',
> >                 db.Field('hitid', 'text'),
> >                 db.Field('creation_time', 'datetime'))
>
> > .table file:
>
> >       {'creation_time': 'TIMESTAMP', 'hitid': 'TEXT', 'id': 'SERIAL
> > PRIMARY KEY'}
>
> > postgresql schema:
>
> >    id            | integer                     | not null default
> > nextval('hits_log_id_seq'::regclass)
> >    hitid         | text                        |
> >    creation_time | timestamp without time zone |
> >   Indexes:
> >       "hits_log_pkey" PRIMARY KEY, btree (id)
>
> > == Step 2 ==
> > Now I add a column "xmlbody":
>
> >       db.define_table('hits_log',
> >                 db.Field('hitid', 'text'),
> >                 db.Field('creation_time', 'datetime'),
> >                 db.Field('xmlbody', 'text'))
>
> > I re-run web2py with:
> >      python web2py.py -a 'foo' -i lovebox.local
>
> > I load a controller function. But it hasn't updated my postgresql
> > schema:
>
> >    id            | integer                     | not null default
> > nextval('hits_log_id_seq'::regclass)
> >    hitid         | text                        |
> >    creation_time | timestamp without time zone |
> >   Indexes:
> >       "hits_log_pkey" PRIMARY KEY, btree (id)
>
> > even though the .table file is updated:
>
> >   {'creation_time': 'TIMESTAMP',
> >    'hitid': 'TEXT',
> >    'id': 'SERIAL PRIMARY KEY',
> >    'xmlbody': 'TEXT'}
>
> > and sql.log now has:
> >    ALTER TABLE hits_log ADD xmlbody TEXT;
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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/web2py?hl=en.


Reply via email to