happy to hear that... of course lazy_tables postpone the eventual
migration at the first attempt of accessing it
On Thursday, December 6, 2012 2:47:48 AM UTC+1, Joe Barnhart wrote:
Wait! I figured it out! When lazy_tables=True the column structure is
migrated only when the table is
uhm: are you sure that adding unique=True gets the created index also in
the parent table ? I think that the unique is enforced only on creation and
not in migration (but the requires=IS_IN_DB() gets added anyway). In any
case, what are you observing? (in other words, post a model and a
Ok, here is the setup. I have a table defined:
db.define_table(xxx,
Field(lastname,string,length=50,label=Last name,requires=
IS_NOT_EMPTY() ),
Field(firstname,string,length=50,label=First name,requires=
IS_NOT_EMPTY() ),
Field(middlename,string,length=50,label=Middle name ),
thx. Just checked with stable and development, columns get migrated and a
costraint is applied both to the parent and the child table
On Wednesday, December 5, 2012 7:58:30 PM UTC+1, Joe Barnhart wrote:
Ok, here is the setup. I have a table defined:
db.define_table(xxx,
And I just tried again and it definitely did NOT add the constraint to the
second table. Are you sure you added a constraint of unique=True? Maybe
it depends on the type of constraint added (notnull, unique, etc.).
-- Joe B.
On Wednesday, December 5, 2012 12:25:51 PM UTC-8, Niphlod wrote:
Wait! I figured it out! When lazy_tables=True the column structure is
migrated only when the table is built. Duh! I switched lazy_tables=False
and it migrated table 2 as you experienced.
Whew! I thought I was going crazy(er) for awhile!
-- Joe B.
On Wednesday, December 5, 2012 12:25:51
6 matches
Mail list logo