[ic] Generation of MySQL Tables

Gary Norton interchange-users@interchange.redhat.com
Thu Jan 24 15:21:00 2002


--=_09546861.E584EB55
Content-Type: multipart/alternative; boundary="=_09546861.E687E856"

--=_09546861.E687E856
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi all I have a question about how interchange generates tables in MySQL.
=20
Specifically I noticed 2 tables (AREA, CAT) list fewer columns in =
/dbconf/mysql/cat.mysql and area.mysql than are actually created by =
interchange.
=20
Here is an export for the cat table
=20
CREATE TABLE cat (
  code varchar(20) NOT NULL default '',
  sel varchar(64) NOT NULL default '',
  name varchar(64) NOT NULL default '',
  which_page text,
  sort varchar(4) NOT NULL default 'ZZ',
  display_type text,
  image text,
  image_prop text,
  banner_image text,
  banner_text text,
  link_type text,
  url text,
  tab text,
  page text,
  search text,
  selector text,
  link_template text,
  PRIMARY KEY  (code),
  KEY sel (sel),
  KEY name (name),
  KEY sort (sort),
  KEY cat_code (code)
) TYPE=3DMyISAM;

=20
but this is what is listed in cat.mysql
=20
Database  cat  cat.txt __SQLDSN__
#ifdef SQLUSER
Database  cat  USER         __SQLUSER__
#endif
#ifdef SQLPASS
Database  cat  PASS         __SQLPASS__
#endif
Database  cat  DEFAULT_TYPE text
Database  cat  COLUMN_DEF   "code=3Dchar(20) NOT NULL PRIMARY KEY"
Database  cat  COLUMN_DEF   "sel=3DCHAR(64) DEFAULT '' NOT NULL, index(sel)=
"
Database  cat  COLUMN_DEF   "name=3DCHAR(64) DEFAULT '' NOT NULL, =
index(name)"
Database  cat  COLUMN_DEF   "sort=3DCHAR(4) DEFAULT 'ZZ' NOT NULL, =
index(sort)"

Can someone please explain to me where the additional colums came from? =
Also, it should be noted that the additional columns are the same in the =
area table. Is there another file somewhere, or have I just overlooked =
something?
=20
I tried searching the archives, as well as the documentation, but =
apparently I am not using the correct keywords or reading the manual in =
the right place.
=20
TIA,
Gary


--=_09546861.E687E856
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 6.00.2712.300" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN-TOP: 2px; FONT: 8pt Tahoma; MARGIN-LEFT: 2px">
<DIV><FONT size=3D1>Hi all I have a question about how interchange =
generates=20
tables in MySQL.</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1>Specifically I noticed 2 tables (AREA, CAT) list fewer =
columns=20
in /dbconf/mysql/cat.mysql and area.mysql than are actually created by=20
interchange.</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT size=3D1>Here is an export for the cat table</FONT></DIV>
<DIV><FONT size=3D1></FONT>&nbsp;</DIV>
<DIV>CREATE TABLE cat (<BR>&nbsp; code varchar(20) NOT NULL default=20
'',<BR>&nbsp; sel varchar(64) NOT NULL default '',<BR>&nbsp; name =
varchar(64)=20
NOT NULL default '',<BR>&nbsp; which_page text,<BR>&nbsp; sort varchar(4) =
NOT=20
NULL default 'ZZ',<BR>&nbsp; display_type text,<BR>&nbsp; image text,<BR>&n=
bsp;=20
image_prop text,<BR>&nbsp; banner_image text,<BR>&nbsp; banner_text=20
text,<BR>&nbsp; link_type text,<BR>&nbsp; url text,<BR>&nbsp; tab=20
text,<BR>&nbsp; page text,<BR>&nbsp; search text,<BR>&nbsp; selector=20
text,<BR>&nbsp; link_template text,<BR>&nbsp; PRIMARY KEY&nbsp;=20
(code),<BR>&nbsp; KEY sel (sel),<BR>&nbsp; KEY name (name),<BR>&nbsp; KEY =
sort=20
(sort),<BR>&nbsp; KEY cat_code (code)<BR>) TYPE=3DMyISAM;<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>but this is what is listed in cat.mysql</DIV>
<DIV>&nbsp;</DIV>
<DIV>Database&nbsp; cat&nbsp; cat.txt __SQLDSN__<BR>#ifdef=20
SQLUSER<BR>Database&nbsp; cat&nbsp;=20
USER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
__SQLUSER__<BR>#endif<BR>#ifdef SQLPASS<BR>Database&nbsp; cat&nbsp;=20
PASS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
__SQLPASS__<BR>#endif<BR>Database&nbsp; cat&nbsp; DEFAULT_TYPE=20
text<BR>Database&nbsp; cat&nbsp; COLUMN_DEF&nbsp;&nbsp; "code=3Dchar(20) =
NOT NULL=20
PRIMARY KEY"<BR>Database&nbsp; cat&nbsp; COLUMN_DEF&nbsp;&nbsp; "sel=3DCHAR=
(64)=20
DEFAULT '' NOT NULL, index(sel)"<BR>Database&nbsp; cat&nbsp;=20
COLUMN_DEF&nbsp;&nbsp; "name=3DCHAR(64) DEFAULT '' NOT NULL,=20
index(name)"<BR>Database&nbsp; cat&nbsp; COLUMN_DEF&nbsp;&nbsp; "sort=3DCHA=
R(4)=20
DEFAULT 'ZZ' NOT NULL, index(sort)"<BR></DIV>
<DIV>Can someone please explain to me where the additional colums came =
from?=20
Also, it should be noted that the additional columns are the same in the =
area=20
table. Is there another file somewhere, or have I just overlooked=20
something?</DIV>
<DIV>&nbsp;</DIV>
<DIV>I tried searching the archives, as well as the documentation, but=20
apparently I am not using the correct keywords or reading the manual in =
the=20
right place.</DIV>
<DIV>&nbsp;</DIV>
<DIV>TIA,</DIV>
<DIV>Gary</DIV></BODY></HTML>

--=_09546861.E687E856--

--=_09546861.E584EB55
Content-Type: text/plain
Content-Disposition: attachment; filename="Gary Norton.vcf"

BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:Gary Norton
EMAIL;WORK;PREF;NGW:GNORTON@broadgap.com
N:Norton;Gary
END:VCARD


--=_09546861.E584EB55--