English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

How to create new tables with a view?
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: How to create new tables with a view?
#2518
How to create new tables with a view? 14 Years, 6 Months ago Karma: 0
Dear Edwin,

I have now installed Kunena with shared tables fro my slave site. In addition I have a hack, which sends out email to all kunena users when a post is made. The developer of the hack has sent following question:

"I was not able to apply this DB hack on yourclimatetv.tv as the database tables are created via a View. If you know how these table were created as a View please let me know."


----------------

Here is the hack:


Step 1) Copy 3 files in this zip here: components/com_kunena/templates/default/

Step 2) Run these 2 queries in database(Please not if the joomla database prefix is same or change accordingly.)

ALTER TABLE jos_fb_subscriptions CHANGE `thread` `thread` INT( 11 ) NULL DEFAULT '0'

ALTER TABLE jos_fb_subscriptions ADD `category` INT( 11 ) NULL DEFAULT '0'

Step 3) Backup your "jos_fb_subscriptions" table. Open the backup sql file in an editor. You will see a create table command as

--
-- Table structure for table `jos_fb_subscriptions`
--

CREATE TABLE `jos_fb_subscriptions` (
`thread` int(11) default '0',
`userid` int(11) NOT NULL default '0',
`future1` int(11) default '0',
`category` int(11) default '0',
UNIQUE KEY `thread` (`thread`,`userid`),
KEY `userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--


Remove UNIQUE KEY command from this so it should look like:

--
-- Table structure for table `jos_fb_subscriptions`
--

CREATE TABLE `jos_fb_subscriptions` (
`thread` int(11) default '0',
`userid` int(11) NOT NULL default '0',
`future1` int(11) default '0',
`category` int(11) default '0',

KEY `userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--

.Now drop "jos_fb_subscriptions" from your database and run this backup to restore the table.
kaliya
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2009/11/12 14:11 By kaliya.
The administrator has disabled public write access.
 
#2519
Re:How to create new tables with a view? 14 Years, 6 Months ago Karma: 54
MySQL view keep a snapshot of the table layout.
Therefore if you change the original table layout, you have to rebuild the views.
The procedure consists in removing the view and recreating it.

If you have modified the Kunena DB table layout and you want to propagate this modification to the slave site that share this extension, you have to uninstall the kunena in the slave site that share it and after re-install the sharing.
You can do that with JMS tools where you uninstall the linked kunena in a specific slave site and after you re-install the shared extension in the slave site.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla