Flat Theme & JomSocial 4.3.5 Now AvailableMore
League Bundle $1335 $599 Read More

Blog

Learn about new releases, tips & tricks
  • Written by
  • Hits: 1331

Database updates in major JomSocial versions

This article is targeted at advanced JomSocial users who wish to know modified database tables for each major upgrade of JomSocial. You are expected to be familiar with MySQL, PHPMyAdmin and a bit of PHP.

All queries below assumes you are using jos_# database prefix.

JomSocial 2.6

/*Add events allday fields in events table*/
ALTER TABLE `jos_community_events` ADD `allday` TINYINT( 11 ) NOT NULL DEFAULT '0';

CREATE TABLE `jos_community_notifications` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`actor` INT( 11 ) NOT NULL ,
`target` INT( 11 ) NOT NULL ,
`content` TEXT NOT NULL ,
`type` VARCHAR( 200 ) NOT NULL,
`cmd_type` TEXT NOT NULL,
`status` TINYINT NOT NULL,
`created` DATETIME NOT NULL ,
`params` TEXT NOT NULL
) ENGINE = MYISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

/*FIle sharing */
CREATE TABLE IF NOT EXISTS `jos_community_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `groupid` int(11) NOT NULL,
  `discussionid` int(11) NOT NULL,
  `eventid` int(11) NOT NULL,
  `profileid` int(11) NOT NULL,
  `filepath` varchar(255) NOT NULL,
  `filesize` int(11) NOT NULL,
  `hits` int(11) NOT NULL,
  `storage` varchar(64) NOT NULL,
  `creator` int(11) NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`)
);

CREATE TABLE `jos_community_videos_tag` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`videoid` INT( 11 ) NOT NULL ,
`userid` INT( 11 ) NOT NULL ,
`position` TEXT NOT NULL ,
`created_by` INT( 11 ) NOT NULL ,
`created` datetime NOT NULL
) ENGINE = MYISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

/* event recurring */
ALTER TABLE `jos_community_events` ADD `repeat` VARCHAR( 50 ) DEFAULT NULL COMMENT 'null,daily,weekly,monthly';
ALTER TABLE `jos_community_events` ADD `repeatend` DATE NOT NULL;
ALTER TABLE `jos_community_events` ADD `parent` INT( 11 ) NOT NULL COMMENT 'parent for recurring event' AFTER `id`;

/* File bulletin id support */
ALTER TABLE `jos_community_files` ADD `bulletinid` INT NOT NULL AFTER `discussionid`;

/* lock profile in each profile */
ALTER TABLE  `jos_community_profiles` ADD  `profile_lock` TINYINT( 1 ) NULL DEFAULT  '0' AFTER  `create_events`;

/* Store the type of file uploaded */
ALTER TABLE `jos_community_files` ADD  `type` VARCHAR( 255 );


/* Add params field for group-discussion */
ALTER TABLE `jos_community_groups_discuss` ADD `params` TEXT NOT NULL;

/* Add params field for group-bulletin */
ALTER TABLE `jos_community_groups_bulletins` ADD `params` TEXT NOT NUL;

ALTER TABLE `jos_community_events`
ADD KEY `idx_catid` (`catid`),
ADD KEY `idx_published` (`published`);

ALTER TABLE `jos_community_notifications`
ADD KEY `created` (`created`),
ADD KEY `status` (`status`),
ADD KEY `type` (`type`),
ADD KEY `target` (`target`),
ADD KEY `actor` (`actor`);

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW

Ask a Question

Ask a question