# MySQL dump 4.0
#
# Host: localhost    Database: sugar
#--------------------------------------------------------

#
# Table structure for table 'category'
#
CREATE TABLE category (
  id int(11) DEFAULT '0' NOT NULL auto_increment,
  catdesc char(50) DEFAULT '' NOT NULL,
  PRIMARY KEY (id)
);

#
# Dumping data for table 'category'
#


#
# Table structure for table 'company'
#
CREATE TABLE company (
  id int(11) DEFAULT '0' NOT NULL auto_increment,
  companyname varchar(100) DEFAULT '' NOT NULL,
  address1 varchar(50) DEFAULT '' NOT NULL,
  address2 varchar(50) DEFAULT '' NOT NULL,
  town varchar(30) DEFAULT '' NOT NULL,
  postcode varchar(15) DEFAULT '' NOT NULL,
  country varchar(25) DEFAULT '' NOT NULL,
  contact varchar(50) DEFAULT '' NOT NULL,
  telno varchar(20) DEFAULT '' NOT NULL,
  faxno varchar(20) DEFAULT '' NOT NULL,
  email varchar(50) DEFAULT '' NOT NULL,
  webpage varchar(50) DEFAULT '' NOT NULL,
  logofile char(1) DEFAULT '' NOT NULL,
  companydescription text,
  PRIMARY KEY (id)
);

#
# Dumping data for table 'company'
#


#
# Table structure for table 'companycategory'
#
CREATE TABLE companycategory (
  id int(11) DEFAULT '0' NOT NULL auto_increment,
  compid int(11) DEFAULT '0' NOT NULL,
  catid int(11) DEFAULT '0' NOT NULL,
  PRIMARY KEY (id)
);

#
# Dumping data for table 'companycategory'
#


#
# Table structure for table 'datadictionary'
#
CREATE TABLE datadictionary (
  id int(11) DEFAULT '0' NOT NULL auto_increment,
  fieldname char(50) DEFAULT '' NOT NULL,
  tablename int(11) DEFAULT '0' NOT NULL,
  displayname char(50) DEFAULT '' NOT NULL,
  type int(11) DEFAULT '0' NOT NULL,
  displayorder int(11) DEFAULT '0' NOT NULL,
  size int(11),
  selectdisplay enum('N','T') DEFAULT 'N',
  mandatory enum('N','T') DEFAULT 'N',
  enforceunique enum('N','T') DEFAULT 'N',
  relationshiptable int(11),
  relationshipfield char(50),
  listdisplay enum('N','T') DEFAULT 'N',
  PRIMARY KEY (id)
);

#
# Dumping data for table 'datadictionary'
#

INSERT INTO datadictionary VALUES (1,'displayname',1,'Display Name',1,3,40,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (2,'id',1,'ID',7,1,8,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (3,'type',1,'Table Type',8,50,20,'T','T','F',4,'type','T');
INSERT INTO datadictionary VALUES (4,'displayorder',1,'Display Order',3,70,4,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (5,'tablename',1,'Table Name',1,2,30,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (6,'cached',1,'Is Table Cached?',6,100,1,'F','F','F',0,'','T');
INSERT INTO datadictionary VALUES (7,'listdisplay',2,'Display on List?',6,55,1,'F','F','F',0,'','F');
INSERT INTO datadictionary VALUES (8,'id',2,'ID',7,1,8,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (9,'size',2,'Field Size',3,45,3,'F','F','F',0,'','T');
INSERT INTO datadictionary VALUES (10,'enforceunique',2,'Unique?',6,65,0,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (11,'relationshiptable',2,'Relationship Table',8,70,20,'T','F','T',1,'tablename','T');
INSERT INTO datadictionary VALUES (12,'selectdisplay',2,'Use as Selection Criteria?',6,57,1,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (13,'mandatory',2,'Mandatory?',6,60,1,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (14,'displayorder',2,'Display Order',3,50,3,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (15,'type',2,'Type',8,40,20,'T','T','F',3,'type','T');
INSERT INTO datadictionary VALUES (16,'displayname',2,'Display Name',1,30,40,'F','F','F',0,'','T');
INSERT INTO datadictionary VALUES (17,'fieldname',2,'Field Name',1,20,30,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (18,'tablename',2,'Table Name',8,10,20,'T','T','F',1,'tablename','T');
INSERT INTO datadictionary VALUES (19,'relationshipfield',2,'Relationship Field',1,80,30,'F','F','F',0,'','T');
INSERT INTO datadictionary VALUES (20,'typedisplay',3,'Field Type',1,3,40,'F','F','F',0,'','T');
INSERT INTO datadictionary VALUES (21,'id',3,'ID',7,1,8,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (22,'type',3,'Field Type',1,2,30,'F','T','F',0,'','T');
INSERT INTO datadictionary VALUES (23,'id',4,'id',7,1,8,'F','F','F',0,'','T');
INSERT INTO datadictionary VALUES (24,'type',4,'Type',1,10,50,'F','F','T',0,'','T');

#
# Table structure for table 'datadictionarytables'
#
CREATE TABLE datadictionarytables (
  id int(11) DEFAULT '0' NOT NULL auto_increment,
  tablename char(50) DEFAULT '' NOT NULL,
  displayname char(50) DEFAULT '' NOT NULL,
  type int(11) DEFAULT '0' NOT NULL,
  displayorder int(11) DEFAULT '0' NOT NULL,
  cached enum('F','T') DEFAULT 'F',
  PRIMARY KEY (id)
);

#
# Dumping data for table 'datadictionarytables'
#

INSERT INTO datadictionarytables VALUES (1,'datadictionarytables','Database Tables',3,1030,'T');
INSERT INTO datadictionarytables VALUES (2,'datadictionary','Data Dictionary',3,1020,'T');
INSERT INTO datadictionarytables VALUES (3,'datadictionarytypes','Data Types',3,1010,'T');
INSERT INTO datadictionarytables VALUES (4,'datadictionarytabletypes','Table Types',3,1000,'T');

#
# Table structure for table 'datadictionarytabletypes'
#
CREATE TABLE datadictionarytabletypes (
  id int(11) DEFAULT '0' NOT NULL auto_increment,
  type char(50) DEFAULT '' NOT NULL,
  PRIMARY KEY (id)
);

#
# Dumping data for table 'datadictionarytabletypes'
#

INSERT INTO datadictionarytabletypes VALUES (1,'Data');
INSERT INTO datadictionarytabletypes VALUES (2,'Codes');
INSERT INTO datadictionarytabletypes VALUES (3,'System');

#
# Table structure for table 'datadictionarytypes'
#
CREATE TABLE datadictionarytypes (
  id int(11) DEFAULT '0' NOT NULL auto_increment,
  type char(50) DEFAULT '' NOT NULL,
  typedisplay char(50) DEFAULT '' NOT NULL,
  PRIMARY KEY (id)
);

#
# Dumping data for table 'datadictionarytypes'
#

INSERT INTO datadictionarytypes VALUES (1,'text','Text');
INSERT INTO datadictionarytypes VALUES (2,'textarea','Text Area');
INSERT INTO datadictionarytypes VALUES (3,'integer','Integer');
INSERT INTO datadictionarytypes VALUES (4,'number','Number');
INSERT INTO datadictionarytypes VALUES (5,'date','Date');
INSERT INTO datadictionarytypes VALUES (6,'boolean','boolean');
INSERT INTO datadictionarytypes VALUES (7,'id','ID');
INSERT INTO datadictionarytypes VALUES (8,'lookup','Lookup Field');
INSERT INTO datadictionarytypes VALUES (9,'password','Password');
INSERT INTO datadictionarytypes VALUES (10,'long','Long Integer');
INSERT INTO datadictionarytypes VALUES (11,'datetime','Date / Time');
INSERT INTO datadictionarytypes VALUES (12,'autorandom','Automatically sent to a random value when record c');

