SQL delle tabelle:
RESOURCES
CREATE TABLE IF NOT EXISTS `resources` ( `id` int(10) unsigned NOT NULL auto_increment, `title` varchar(255) NOT NULL, `description` text NOT NULL, `created` datetime NOT NULL, `modified` datetime NOT NULL, `user_id` int(10) unsigned default NULL, `anonymous_id` int(10) unsigned default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
OWNER RESOURCES
CREATE TABLE IF NOT EXISTS `owner_resources` ( `owner` varchar(45) NOT NULL, `owner_id` int(10) unsigned NOT NULL, `resource_id` int(10) unsigned NOT NULL, `public` tinyint(1) default NULL, `id` int(10) unsigned NOT NULL auto_increment, `status` tinyint(1) default NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
LINKS
CREATE TABLE IF NOT EXISTS `links` ( `id` int(10) unsigned NOT NULL auto_increment, `title` varchar(255) NOT NULL, `url` varchar(255) NOT NULL, `resource_id` int(11) NOT NULL, `created` datetime NOT NULL, `modified` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ATTACHMENTS
CREATE TABLE IF NOT EXISTS `attachments` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL, `fsname` varchar(255) NOT NULL, `size` int(10) unsigned NOT NULL, `type` varchar(255) NOT NULL, `resource_id` int(10) unsigned NOT NULL, `created` datetime NOT NULL, `modified` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
VIDEOS
CREATE TABLE IF NOT EXISTS `videos` ( `id` int(10) unsigned NOT NULL auto_increment, `title` varchar(255) NOT NULL, `url` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `resource_id` int(11) NOT NULL, `created` datetime NOT NULL, `modified` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
USERS vedi modello generale
indietro