|
Posted by Frankly on 06/20/06 01:59
i just learned how to view the sql from the admin
for some reason the relations table is the only one that shows the
Row_Format=Dynamic.
i am so glad i found this. I am so tired and while I am looking at this I
did make a few changes. if you see anything that looks really stupid you
dont have to fix it just give me some pointers. for the life of me i dont
know why i cant do these relations. although i just found this
In the manual search for this chapter "Creating InnoDB Tables" and the title
"FOREIGN KEY Constraints"...
Foreign keys definitions are subject to the following conditions:
- Both tables must be InnoDB type.
- In the referencing table, there must be an index where the foreign key
columns are listed as the first columns in the same order.
- In the referenced table, there must be an index where the referenced
columns are listed as the first columns in the same order.
- Index prefixes on foreign key columns are not supported. One consequence
of this is that BLOB and TEXT columns cannot be included in a foreign key,
because indexes on those columns must always include a prefix length
i am to tired to try again.
i think the problem i am having here is not naming the index's and foreign
keys correctly. im going to stop for the night.
this the the RelationManagements table
DROP TABLE IF EXISTS `myweb325573_grace`.`RelationManagementsBuildings`;
CREATE TABLE `RelationManagementsBuildings` (
`ManID` int(10) unsigned NOT NULL default '0',
`BuildingID` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`ManID`,`BuildingID`)
) TYPE=InnoDB ROW_FORMAT=DYNAMIC;
this is the Managements table
DROP TABLE IF EXISTS `myweb325573_grace`.`Managements`;
CREATE TABLE `Managements` (
`ManID` int(10) unsigned NOT NULL auto_increment,
`Name` varchar(45) NOT NULL default '',
`Contact` varchar(20) NOT NULL default '',
`Phone` varchar(20) NOT NULL default '',
`Address` varchar(45) NOT NULL default '',
`City` varchar(20) NOT NULL default 'New York',
`State` char(2) NOT NULL default 'NY',
`ZipCode` varchar(10) NOT NULL default '',
`WebSite` varchar(255) NOT NULL default '',
PRIMARY KEY (`ManID`)
) TYPE=InnoDB;
this is the Buildings table
DROP TABLE IF EXISTS `myweb325573_grace`.`Buildings`;
CREATE TABLE `Buildings` (
`BuildingID` int(10) unsigned NOT NULL auto_increment,
`BuildingName` varchar(20) NOT NULL default '',
`Address` varchar(45) NOT NULL default '',
`Street` varchar(45) NOT NULL default '',
`CrossStreetA` varchar(45) NOT NULL default '',
`CrossStreetB` varchar(45) NOT NULL default '',
`WebSite` varchar(255) default NULL,
`Elevator` int(10) unsigned default NULL,
`Laundry` int(10) unsigned default NULL,
`Dogs` int(10) unsigned default NULL,
`Cats` int(10) unsigned default NULL,
`Gym` int(10) unsigned default NULL,
`VideoIntercom` int(10) unsigned default NULL,
`Contact` varchar(20) NOT NULL default '',
`ContactPhone` varchar(15) NOT NULL default '',
`Area` varchar(20) NOT NULL default '',
`ZipCode` varchar(10) NOT NULL default '',
`Notes` text NOT NULL,
PRIMARY KEY (`BuildingID`)
) TYPE=InnoDB;
--
Frank
PHPmySQL1@yahoo.com
Navigation:
[Reply to this message]
|