2.3 Data Tables

Introduction

The data tables are the tables that contain the bulk of the site. They can be named anything but needs to follow Ruby on Rails conventions, most importantly the name must be plural. The system will use the Ruby on Rails Inflection methods to translate plural to singular.

Definition

The data table must have the following structure, though text field lengths may be larger or smaller (as long as the fields exist).

CREATE TABLE `manuals` (
`title` varchar(100) NOT NULL,
`description` varchar(3001) NOT NULL,
`created_on` timestamp NOT NULL default '0000-00-00 00:00:00',
`modified_on` timestamp NOT NULL default '0000-00-00 00:00:00',
`id` int(11) NOT NULL auto_increment,
PRIMARY KEY (`id`)
) ENGINE=MyISAM ;

Description

There are really only 2 fields that matter here:
  • Title : title of the record. Must not contain tags.
  • Description: the descriptive text of the title. This text may contain tags, html and other shortcut codes.