- Posts: 131
- Karma: 1
- Thank you received: 13
Grid Status: | Online |
Total Regions: | 23 |
Visitors (30 Days): | 12 |
Total Residents: | 485 |
Online Now: | 0 |
Hypergriders online: | 0 |
Please Log in or Create an account to join the conversation.
SET @opensimdb = "ROBUSTDB";
SET @joomladb = "JOOMLADB";
SET @joomlaprefix = "jos_";
# groups_groups -> opensim_groups
SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_group SELECT GroupID,Name,Charter,InsigniaID,FounderID,MembershipFee,OpenEnrollment,ShowInList,AllowPublish,MaturePublish,OwnerRoleID FROM ",@opensimdb,".`os_groups_groups`;");
PREPARE stmt FROM @query;
EXECUTE stmt;
# groups_principals -> opensim_group_active
SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_groupactive SELECT PrincipalID,ActiveGroupID FROM ",@opensimdb,".`os_groups_principals`;");
PREPARE stmt FROM @query;
EXECUTE stmt;
# groups_invites -> opensim_groupinvite
SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_groupinvite SELECT InviteID,GroupID,RoleID,PrincipalID,TMStamp FROM ",@opensimdb,".`os_groups_invites`;");
PREPARE stmt FROM @query;
EXECUTE stmt;
# groups_membership -> opensim_groupmembership
SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_groupmembership SELECT GroupID,PrincipalID,SelectedRoleID,Contribution,ListInProfile,AcceptNotices FROM ",@opensimdb,".`os_groups_membership`;");
PREPARE stmt FROM @query;
EXECUTE stmt;
# groups_notices -> opensim_groupnotice
SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_groupnotice SELECT GroupID,NoticeID,TMStamp,FromName,Subject,Message,NULL FROM ",@opensimdb,".`os_groups_notices`;");
PREPARE stmt FROM @query;
EXECUTE stmt;
# groups_roles -> opensim_grouprole
SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_grouprole SELECT GroupID,RoleID,Name,Description,Title,Powers FROM ",@opensimdb,".`os_groups_roles`;");
PREPARE stmt FROM @query;
EXECUTE stmt;
# groups_rolemembership -> opensim_grouprolemembership
SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_grouprolemembership SELECT GroupID,RoleID,PrincipalID FROM ",@opensimdb,".`os_groups_rolemembership`;");
PREPARE stmt FROM @query;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
Please Log in or Create an account to join the conversation.
i already made a copy of group so no danger touching on opensim databasefoto50 wrote: @andsim:
First of all ... I think I mentioned this in other posts already, but here just once again even more: when migrating/manipulating data, a backup before is never a bad idea
The column "Location" in the group table is not required for group owned land. This data is stored in the simulators database elsewhere
@fredy:
The SQL below is migrating data from opensim tables to jopensim tables. But it will not help you, as long as your simulators do not read/write from there. So before migrating data, ensure your setup is correct ... otherwise you wonder why you change groups in jOpenSim but it has no affect inworld or vice versa
A word to the sql and how it works:
The tables of opensim and jOpenSim must reside on the same server, but not necessarily in the same database. You need to run the sql with a user that has access to both databases!
Attachments from group notices are NOT migrated with this SQL since the way, they are stored are quite different. If you dont need to migrate group notices, just remove the block starting with "# groups_notices -> opensim_groupnotice"
You just need to alter the first 3 lines to your DB names (and Joomla prefix) ... the SQL will take care of the rest
SET @opensimdb = "ROBUSTDB"; SET @joomladb = "JOOMLADB"; SET @joomlaprefix = "jos_"; # groups_groups -> opensim_groups SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_group SELECT GroupID,Name,Charter,InsigniaID,FounderID,MembershipFee,OpenEnrollment,ShowInList,AllowPublish,MaturePublish,OwnerRoleID FROM ",@opensimdb,".`os_groups_groups`;"); PREPARE stmt FROM @query; EXECUTE stmt; # groups_principals -> opensim_group_active SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_groupactive SELECT PrincipalID,ActiveGroupID FROM ",@opensimdb,".`os_groups_principals`;"); PREPARE stmt FROM @query; EXECUTE stmt; # groups_invites -> opensim_groupinvite SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_groupinvite SELECT InviteID,GroupID,RoleID,PrincipalID,TMStamp FROM ",@opensimdb,".`os_groups_invites`;"); PREPARE stmt FROM @query; EXECUTE stmt; # groups_membership -> opensim_groupmembership SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_groupmembership SELECT GroupID,PrincipalID,SelectedRoleID,Contribution,ListInProfile,AcceptNotices FROM ",@opensimdb,".`os_groups_membership`;"); PREPARE stmt FROM @query; EXECUTE stmt; # groups_notices -> opensim_groupnotice SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_groupnotice SELECT GroupID,NoticeID,TMStamp,FromName,Subject,Message,NULL FROM ",@opensimdb,".`os_groups_notices`;"); PREPARE stmt FROM @query; EXECUTE stmt; # groups_roles -> opensim_grouprole SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_grouprole SELECT GroupID,RoleID,Name,Description,Title,Powers FROM ",@opensimdb,".`os_groups_roles`;"); PREPARE stmt FROM @query; EXECUTE stmt; # groups_rolemembership -> opensim_grouprolemembership SET @query = CONCAT("INSERT INTO ",@joomladb,".",@joomlaprefix,"opensim_grouprolemembership SELECT GroupID,RoleID,PrincipalID FROM ",@opensimdb,".`os_groups_rolemembership`;"); PREPARE stmt FROM @query; EXECUTE stmt; DEALLOCATE PREPARE stmt;
Greetz
FoTo50
PS: did I already mention the thing about the backup? ...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please consider supporting our efforts.
Region: | Loc X: | Loc Y: |
---|---|---|
Agora | 1000 | 998 |
BareBad… | 997 | 997 |
Bohemas | 996 | 998 |
BoraBor… | 1002 | 999 |
Crystal… | 1001 | 1000 |
DeepTho… | 1005 | 998 |
FoToSan… | 999 | 995 |
jCity | 1001 | 997 |
jOpenWe… | 1000 | 999 |
JuniorT… | 1002 | 1001 |
Kanadah… | 1002 | 1000 |
LindaKe… | 1000 | 997 |
LittleC… | 996 | 997 |
MonteSc… | 1001 | 1001 |
Naos | 999 | 999 |
Pangaea | 1005 | 1003 |
RiverSi… | 999 | 1000 |
Sakani | 999 | 998 |
Snambin | 1001 | 998 |
Tartola | 997 | 998 |
ViewerH… | 1002 | 998 |
WaterWo… | 1001 | 999 |
WilderK… | 1000 | 1000 |
Grid Status: | Online |
Total Regions: | 23 |
Visitors (30 Days): | 12 |
Total Residents: | 485 |
Online Now: | 0 |
Hypergriders online: | 0 |