Advertisement
Guest User

Table Schema

a guest
Apr 21st, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. CREATE TABLE `fielddef` (
  2. `Field_ID` int(11) NOT NULL DEFAULT '0',
  3. `TID` int(11) NOT NULL DEFAULT '0',
  4. `IsCustom` tinyint(1) NOT NULL DEFAULT '0',
  5. `Name` varchar(64) NOT NULL DEFAULT '',
  6. `ExtID` int(11) NOT NULL DEFAULT '0',
  7. `IntID` int(11) NOT NULL DEFAULT '0',
  8. `Priority` int(11) NOT NULL DEFAULT '0',
  9. `IsIndexable` tinyint(1) NOT NULL DEFAULT '0',
  10. `IsIndexed` tinyint(1) NOT NULL DEFAULT '0',
  11. `IndexID` int(11) NOT NULL DEFAULT '0',
  12. `IsMultiValued` tinyint(1) NOT NULL DEFAULT '0',
  13. `UserFlags` int(11) NOT NULL DEFAULT '0',
  14. `ClassID` tinyblob NOT NULL,
  15. `MultiValueDups` int(11) NOT NULL DEFAULT '0',
  16. `MultipleKeys` int(11) NOT NULL DEFAULT '0',
  17. PRIMARY KEY (`Field_ID`),
  18. KEY `IX_FieldDef__1` (`TID`),
  19. KEY `wb_1` (`Field_ID`,`Name`),
  20. CONSTRAINT `FK_FieldDef__1` FOREIGN KEY (`TID`) REFERENCES `tabledef` (`TID`) ON DELETE CASCADE
  21. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  22.  
  23.  
  24. CREATE TABLE `customdata` (
  25. `Field_ID` int(11) NOT NULL DEFAULT '0',
  26. `Record_ID` int(11) NOT NULL DEFAULT '0',
  27. `StringValue` varchar(249) DEFAULT NULL,
  28. `LongStringValue` longtext,
  29. `IntValue` int(11) DEFAULT NULL,
  30. `DecimalValue` decimal(22,8) DEFAULT NULL,
  31. `DateTimeValue` datetime DEFAULT NULL,
  32. `ValueOrder` int(11) DEFAULT NULL,
  33. KEY `IX_CustomData__1` (`Field_ID`),
  34. KEY `IX_CustomData__2` (`Record_ID`,`Field_ID`),
  35. KEY `wb_stringvalue` (`StringValue`),
  36. KEY `IX_CustomData__3` (`StringValue`),
  37. KEY `IX_CustomData__4` (`IntValue`),
  38. KEY `IX_CustomData__5` (`DecimalValue`),
  39. KEY `IX_CustomData__6` (`DateTimeValue`),
  40. CONSTRAINT `FK_CustomData__1` FOREIGN KEY (`Field_ID`) REFERENCES `fielddef` (`Field_ID`) ON DELETE CASCADE,
  41. CONSTRAINT `FK_CustomData__2` FOREIGN KEY (`Record_ID`) REFERENCES `item_table` (`Record_ID`) ON DELETE CASCADE
  42. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement