I am not sure of that, but if there is migrate=False at table level and you set to migrate = true at DAL level it should not override the table level... So better to set also migrate=False at table define level...
I think you should be aware of this (from the book) : Migrations can be disabled for all tables at the moment of connection: migrate_enabled=False So I think there is a risk of of overriding the migrate=False at table_define level... I you connect with the same app to 2 differents database, maybe you can circumvent the problem by having 2 db : db1 = DAL <http://web2py.com/book/default/docstring/DAL>('sqlite://storage.db', migrate=False) db2 = DAL <http://web2py.com/book/default/docstring/DAL>(*'DB2'*, migrate=False) http://web2py.com/book/default/chapter/06#Migrations Richard On Tue, Nov 1, 2011 at 12:46 PM, Omi Chiba <[email protected]> wrote: > Richard, > > Thanks for your reply. Yep, I set the migrate=False at DAL level so > that I don't have to specify each table. > > > If you use crud and you define permissions, just don't give update, > delete > > and create rigths (so just read and select, maybe). > > > > About the not lock any record, I don't know how it works exactly, but I > > think that if you only use read and select there will be not lock (to be > > confirmed). > > Yeah, that's kind of what I thought. As long as I'm SELECTing it's > should not lock the record but I wasn't sure. > > On Nov 1, 9:31 am, Richard Vézina <[email protected]> wrote: > > migrate=False > > > > If you use crud and you define permissions, just don't give update, > delete > > and create rigths (so just read and select, maybe). > > > > About the not lock any record, I don't know how it works exactly, but I > > think that if you only use read and select there will be not lock (to be > > confirmed). > > > > Richard > > > > > > > > > > > > > > > > On Tue, Nov 1, 2011 at 10:25 AM, Omi Chiba <[email protected]> wrote: > > > I'm connecting existing tables on DB2 which is for a mission critical > > > system. I just want to read them and don't want to lock any record on > > > the tables. > > > > > Shoud I explicitly put readonly or it doesn't matter if I don't use > > > like crud.update ?? > > > > > My definition for existing table > > > ----------------------------------------- > > > db.define_table('SDTH2L01', > > > Field('H2DNO', length=8), > > > Field('H2JDNO', length=8), > > > Field('H2JGNO', 'integer'), > > > Field('H2PRCD', length=15), > > > Field('H2PRKJ', length=50), > > > Field('H2TRS', 'integer'), > > > Field('H2HZS', 'integer'), > > > primarykey=['H2DNO']) >

