Simon McManus

Javascript Engineer

Latest Database design for ccTiddly

erm2.jpg

and the sql :
[sourcecode language='sql']
-- phpMyAdmin SQL Dump
-- version 2.10.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 09, 2007 at 01:32 PM
-- Server version: 5.0.41
-- PHP Version: 5.2.2

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `permissions`
--

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

--
-- Table structure for table `admin_of_instance`
--

CREATE TABLE `admin_of_instance` (
`user_id` varchar(255) NOT NULL,
`instance_name` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `admin_of_instance`
--

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

--
-- Table structure for table `group`
--

CREATE TABLE `group` (
`name` varchar(50) NOT NULL,
`desc` mediumtext NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `group`
--

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

--
-- Table structure for table `group_membership`
--

CREATE TABLE `group_membership` (
`user_id` varchar(255) NOT NULL,
`group_name` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `group_membership`
--

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

--
-- Table structure for table `instance`
--

CREATE TABLE `instance` (
`name` varchar(100) NOT NULL,
`lang` varchar(10) NOT NULL,
`keep_revision` int(1) NOT NULL,
`require_login` int(1) NOT NULL,
`session_expire` int(10) NOT NULL,
`tag_tiddler_with_modifier` int(1) NOT NULL,
`char_set` varchar(10) NOT NULL,
`hashseed` varchar(50) NOT NULL,
`debug` int(1) NOT NULL,
`status` varchar(10) NOT NULL,
`tiddlywiki_type` varchar(30) NOT NULL,
`default_anonymous_perm` varchar(4) NOT NULL,
`default_user_perm` varchar(4) NOT NULL,
`rss_group` varchar(50) NOT NULL,
`markup_group` varchar(50) NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `instance`
--

INSERT INTO `instance` (`name`, `lang`, `keep_revision`, `require_login`, `session_expire`, `tag_tiddler_with_modifier`, `char_set`, `hashseed`, `debug`, `status`, `tiddlywiki_type`, `default_anonymous_perm`, `default_user_perm`, `rss_group`, `markup_group`) VALUES
('permissions', 'en', 1, 0, 0, 0, 'utf8', '', 0, '', 'TiddlyWiki', '', '', '', '');

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

--
-- Table structure for table `login_session`
--

CREATE TABLE `login_session` (
`user_id` varchar(255) NOT NULL,
`session_token` varchar(150) NOT NULL COMMENT 'username+password+time',
`expire` int(20) NOT NULL,
`ip` varchar(15) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `login_session`
--

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

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
`read` int(1) NOT NULL,
`insert` int(1) NOT NULL,
`edit` int(1) NOT NULL,
`delete` int(1) NOT NULL,
`group_name` varchar(50) NOT NULL,
`instance_name` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `permissions`
--

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

--
-- Table structure for table `tiddler`
--

CREATE TABLE `tiddler` (
`id` int(11) NOT NULL auto_increment,
`instance_name` varchar(100) NOT NULL,
`title` text NOT NULL,
`body` mediumtext NOT NULL,
`fields` text NOT NULL,
`tags` text NOT NULL,
`modifier` varchar(255) NOT NULL,
`creator` varchar(255) NOT NULL,
`modified` varchar(12) NOT NULL,
`created` varchar(12) NOT NULL,
`version` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `tiddler`
--

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

--
-- Table structure for table `tiddler_revision`
--

CREATE TABLE `tiddler_revision` (
`id` int(11) NOT NULL auto_increment,
`title` text NOT NULL,
`body` mediumtext NOT NULL,
`fields` text NOT NULL,
`modified` varchar(12) NOT NULL,
`modifier` varchar(255) NOT NULL,
`revision` int(11) NOT NULL,
`tags` text NOT NULL,
`tiddler_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `tiddler_revision`
--

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

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
`id` varchar(255) NOT NULL,
`password` varchar(50) NOT NULL,
`short_name` varchar(50) NOT NULL,
`long_name` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user`
--

[/sourcecode]

November 9th 2007