WCT Users (integrators)
Component : WCT_BLOG
Id : 022
|
|
Database Model
Script for database model creation
# phpMyAdmin MySQL-Dump
# http://www.htmlwizard.net/phpMyAdmin/
# --------------------------------------------------------
#
# Web Component DB Storage Model
# Object Name : WCT_BLOG
# Object SQL : Installation script
# Object ID : 022
# Object Prototype URL : http://www.diml.org/wct/proto/WCT_BLOG
# --------------------------------------------------------
# Table structure for table 'wct022_blog'
#
DROP TABLE IF EXISTS `wct022_blogdata`;
CREATE TABLE `wct022_blogdata` (
`id` int(11) NOT NULL default '0',
`instance` tinyint(4) NOT NULL default '0',
`owner` varchar(16) NOT NULL default '',
`title` varchar(255) NOT NULL default '',
`content` text NOT NULL,
`postdate` datetime NOT NULL default '0000-00-00 00:00:00',
`lastreviewed` datetime NOT NULL default '0000-00-00 00:00:00',
`imageUrl` varchar(255) NOT NULL default ''
) TYPE=MyISAM;
#
# Structure de la table `wct022_blogs`
#
DROP TABLE IF EXISTS `wct022_blogs`;
CREATE TABLE `wct022_blogs` (
`id` smallint(6) NOT NULL default '0',
`instance` tinyint(4) NOT NULL default '0',
`owner` varchar(16) NOT NULL default '',
`allowedWriters` varchar(255) NOT NULL default '',
`active` enum('yes','no') NOT NULL default 'yes',
`allowHTML` enum('yes','no') NOT NULL default 'yes',
`allowImages` enum('yes','no') NOT NULL default 'yes',
`onlyOwnerWrites` enum('yes','no') NOT NULL default 'no',
`firstpostDate` datetime NOT NULL default '0000-00-00 00:00:00',
`lastpostDate` datetime NOT NULL default '0000-00-00 00:00:00',
`lastreadDate` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
UNIQUE KEY `One blog per user constraint` (`instance`,`owner`)
) TYPE=MyISAM;
Script for database model deletion
# Web Component DB Storage Model
# Object Name : WCT_BLOG
# Object SQL : Uninstallation script
# Object ID : 022
# Object Prototype URL : http://www.diml.org/wct/proto/WCT_BLOG
# --------------------------------------------------------
DROP TABLE IF EXISTS wct022_blogdata;
DROP TABLE IF EXISTS wct022_blogs;
Script for database model cleanup
# Web Component DB Storage Model
# Object Name : WCT_BLOG
# Object SQL : Instance cleanup script
# Object ID : 022
# Object Prototype URL : http://www.diml.org/wct/proto/WCT_BLOG
# --------------------------------------------------------
DELETE FROM wct022_blogdata WHERE instance = <%%WCT_BLOG::ID%%>;
DELETE FROM wct022_blogs WHERE instance = <%%WCT_BLOG::ID%%>;
All material is copyleft V.G. FREMAUX (EISTI France) 1999 to 2003 except explicitly mentioned
|