Hello guys!

I'm using web2py to create new dbs automatically for each company that uses
my system. It's using a central DB for authentication and some default
tables.

I heard that somebody was developing an integration to work with these
foreign key inter dbs.

Here everything is working, except auth_user with auth.signature, but I
made a workaround using the default fields (createdby, is_active, etc...),
making index with executesql and mantaining integrity with IS_IN_DB.

IS_IN_DB works great! ex:

*db*.define_table('cool_table',
   Field('user_id', 'integer', requires=IS_IN_DB(*db2*,*db2*.auth_user_id)))

The worst problem is making a record_versioning.

If before this example table I force record_versioning it's create a backup
table, but the feature of make the versioning don't work :(

Example:
*
db*.define_table('cool_table',
Field('created_by', 'integer', requires=IS_EMPTY_OR(IS_IN_DB(db2,
db2.auth_user.id <http://db_pai.auth_user.id>)),
widget=SQLFORM.widgets.options.widget),
                   Field('created_on', 'datetime'),
                   Field('modified_by', 'integer',
requires=IS_EMPTY_OR(IS_IN_DB(db2,
db2.auth_user.id<http://db_pai.auth_user.id>)),
widget=SQLFORM.widgets.options.widget),
                   Field('modified_on', 'datetime'))
db.cool_table._enable_record_versioning()

There is a best way to do it or I need to do my own record versioning?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to