|
@@ -16,7 +16,7 @@ CREATE TABLE `code` ( |
|
|
`code_code` MEDIUMTEXT NOT NULL, |
|
|
`code_code` MEDIUMTEXT NOT NULL, |
|
|
PRIMARY KEY (`code_id`), |
|
|
PRIMARY KEY (`code_id`), |
|
|
KEY (`code_hash`), |
|
|
KEY (`code_hash`), |
|
|
FULLTEXT KEY (`codelet_code`) |
|
|
|
|
|
|
|
|
FULLTEXT KEY (`code_code`) |
|
|
) ENGINE=InnoDB; |
|
|
) ENGINE=InnoDB; |
|
|
|
|
|
|
|
|
CREATE TABLE `codelets` ( |
|
|
CREATE TABLE `codelets` ( |
|
@@ -50,7 +50,7 @@ CREATE TABLE `authors` ( |
|
|
PRIMARY KEY (`author_id`), |
|
|
PRIMARY KEY (`author_id`), |
|
|
FULLTEXT KEY (`author_name`), |
|
|
FULLTEXT KEY (`author_name`), |
|
|
FOREIGN KEY (`author_codelet`) |
|
|
FOREIGN KEY (`author_codelet`) |
|
|
REFERENCES `codelet` (`codelet_id`) |
|
|
|
|
|
|
|
|
REFERENCES `codelets` (`codelet_id`) |
|
|
ON DELETE CASCADE ON UPDATE CASCADE |
|
|
ON DELETE CASCADE ON UPDATE CASCADE |
|
|
) ENGINE=InnoDB; |
|
|
) ENGINE=InnoDB; |
|
|
|
|
|
|
|
@@ -64,7 +64,7 @@ CREATE TABLE `symbols` ( |
|
|
PRIMARY KEY (`symbol_id`), |
|
|
PRIMARY KEY (`symbol_id`), |
|
|
KEY (`symbol_type`, `symbol_name`(32)), |
|
|
KEY (`symbol_type`, `symbol_name`(32)), |
|
|
FOREIGN KEY (`symbol_codelet`) |
|
|
FOREIGN KEY (`symbol_codelet`) |
|
|
REFERENCES `codelet` (`codelet_id`) |
|
|
|
|
|
|
|
|
REFERENCES `codelets` (`codelet_id`) |
|
|
ON DELETE CASCADE ON UPDATE CASCADE |
|
|
ON DELETE CASCADE ON UPDATE CASCADE |
|
|
) ENGINE=InnoDB; |
|
|
) ENGINE=InnoDB; |
|
|
|
|
|
|
|
@@ -85,6 +85,6 @@ CREATE TABLE `cache_data` ( |
|
|
REFERENCES `cache` (`cache_id`) |
|
|
REFERENCES `cache` (`cache_id`) |
|
|
ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
ON DELETE CASCADE ON UPDATE CASCADE, |
|
|
FOREIGN KEY (`cdata_codelet`) |
|
|
FOREIGN KEY (`cdata_codelet`) |
|
|
REFERENCES `codelet` (`codelet_id`) |
|
|
|
|
|
|
|
|
REFERENCES `codelets` (`codelet_id`) |
|
|
ON DELETE CASCADE ON UPDATE CASCADE |
|
|
ON DELETE CASCADE ON UPDATE CASCADE |
|
|
) ENGINE=InnoDB; |
|
|
) ENGINE=InnoDB; |