openmeetings-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vieri <rentor...@yahoo.com>
Subject sipusers table view
Date Thu, 07 Mar 2013 14:23:08 GMT
Hi,

I'd like to have 2 'sipusers' tables in 2 different databases. The content of these tables
could be different.
So in order to share both data sets between Asterisk and OpenMeetings I create 2 views like
this:

echo "create view view_sipusers as select * from sipusers union select * from ${OPENMEETINGS_DBNAME}.sipusers"
| isql -v MySQL-asterisk

echo "create view view_sipusers as select * from sipusers union select * from ${ASTERISK_DBNAME}.sipusers"
| isql -v MySQL-openmeetings

I can tell Asterisk to use the 'view_sipusers' view instead of the sipusers table.
How can I tell OM to use the 'view_sipusers' view?

Also, I'm concerned about the 'id' auto-increment field in both sipusers tables. Maybe I should
simply remove the id in both tables (I wonder if there will be a significant performance hit)
or define views by excluding the id fields:
echo "create view view_sipusers as select [all field names except 'id'] from sipusers union
select * from ${OPENMEETINGS_DBNAME}.sipusers" | isql -v MySQL-asterisk
echo "create view view_sipusers as select [all field names except 'id'] from sipusers union
select * from ${ASTERISK_DBNAME}.sipusers" | isql -v MySQL-openmeetings

Any suggestions?

Thanks,

Vieri


Mime
View raw message