Remove "link" between tables 14 Years, 1 Month ago
|
Karma: 0
|
1) I have created a slave site sharing users and JomSocial tables. However, I do not want all jomsocial tables shared. For example, I want each site to have an independent activity feed. How do I make the slave site use it's own table rather than use the master's table?
So the idea is to drop the table and rebuild them with a copy.
2) In the opposite way, is there a guide to sharing a table in an extension not already supported? I don't mind doing a bit of hacking... Specifically, I am using OSE anti hacker and want the slave to use one of the master's tables for that extension.
Thanks!
|
|
|
Last Edit: 2010/11/21 23:05 By edwin2win.
|
|
Re: Remove "link" between tables 14 Years, 1 Month ago
|
Karma: 54
|
1) Once you have share the users and perhaps other MySQL tables, the only way to make them independent is to drop the view in PHPMyAdmin and to change the JMS table to "remove" the sharing on the JomSocial.
In this case, this will create a new snapshop of the JomSocial MySQL table that willl be a copy.
2) No you can not share any extensions. This require a manual review to discover the data model and see if the extension has relationship outside that could be a reason to exclude it from the sharing.
So if this is a new extension hat that is not yet shared, you can send us the extension for review in the attachement of an email.
|
|
|
|
|
Re: Remove "link" between tables 14 Years, 1 Month ago
|
Karma: 0
|
I am sorry, but can you explain a bit further on #1? For example:
1) What does it mean to "drop the view"? Let's take the activities table, for example. In PHPMyAdmin, I see a jos_community_activities table in the master database and an event_community_activities table in the slave database. What am I supposed to do and to which one am I supposed to do it?
2) What does it mean to "change the JMS table to remove the sharing"? Is this in the "tools" area of the multi-site admin, where I look at the different tables? Can you explain what I am supposed to do exactly?
3) Will this allow me to retain the sharing of the users while I remove the sharing of specific tables? I want to keep the users shared, but not have their activities shared, for example.
Thank you for the help!!
|
|
|
|
|
Re: Remove "link" between tables 14 Years, 1 Month ago
|
Karma: 54
|
1) Drop the view is the MySQL statement to delete a view. "DROP VIEW ..."
You have to drop the view that match the table prefix of your slave site.
As you don't seem knowing MySQL, I suggest that you do a backup of your DB in case where you delete the wrong views.
If you are not familliar with MySQL and the JomSocial PHP code and data model I do not recommend that you try doing partial sharing or have specifc table. This could create inconsistency.
You have the views used by "#__community_XXXX" where #__ is the table prefix and XXX is the table that you would like to have specific- This is the standard joomla writing of the table name.
2) You are supposed to "delete" DROP the views currently present and rebuild the table with a copy.
If you "uninstall" the JomSocial from the JMS Tools, this will delete all the links that does not seem to be your requirement as you mentioned that you just want to have some part specific. So if you ask that, I suppose that you are specialist and you know perfectly the JomSocail data model and the relatioship between the Jomsocial table. Personally I am not a JomSocial data model specialist and this is the reason why the sharing proposed is ALL the tables and not partial tables.
3) This is you that must know the JomSocial MySQL data model and must know which MySQL table you want to have specific. We can not advise you on the JomSocial data model and which JomSocial table should become a physical copy instead of a link.
|
|
|
|
|
Re: Remove "link" between tables 14 Years ago
|
Karma: 0
|
Hi Edwin,
Thanks for the guidance. Let me share what I did in case anybody else finds this thread later on. For each table I wanted to "un-link" from that master site, I:
1) Exported a copy of the table from the master site
2) Dropped the table on the slave site
3) Imported the saved copy into the slave site.
4) Renamed the copy to use the slave site's prefix (not necessary if both databases are using the same "jos_" prefix).
5) Emptied the contents of the new table, which means that I now have the structure of the table, but with no contents.
For JomSocial, I did this to the following tables: (jos_community_)
1) activities
2) activities_hide
3) apps
4) featured
5) mailq
6) wall
So far, everything is testing out perfectly with no problems, but that doesn't guarantee it doesn't have hidden issues. As always, back up your site first!
Edwin, for future reference in your component, some of these really do need to be un-linked for basic functionality. For example, the "jos_community_activities" table simply shouldn't be shared, because the activity stream uses relative links. This means, that the activity stream will include many dead links.
Thanks for the help!
|
|
|
|
|
|