Created
August 16, 2011 17:12
-
-
Save ajbonner/1149571 to your computer and use it in GitHub Desktop.
Fix for magento 1.5.x base table or view not found 'core_file_storage'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS core_file_storage; | |
CREATE TABLE IF NOT EXISTS core_file_storage ( | |
`file_id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
`content` LONGBLOB NOT NULL, | |
`upload_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | |
`filename` varchar(255) NOT NULL DEFAULT '', | |
`directory_id` int(10) unsigned DEFAULT NULL, | |
`directory` varchar(255) DEFAULT NULL, | |
PRIMARY KEY (`file_id`), | |
UNIQUE KEY `IDX_FILENAME` (`filename`, `directory`), | |
KEY (`directory_id`), | |
CONSTRAINT `FK_FILE_DIRECTORY` FOREIGN KEY (`directory_id`) | |
REFERENCES core_directory_storage (`directory_id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='File storage'; | |
DROP TABLE IF EXISTS core_directory_storage; | |
CREATE TABLE IF NOT EXISTS core_directory_storage ( | |
`directory_id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
`name` varchar(255) NOT NULL DEFAULT '', | |
`path` varchar(255) NOT NULL DEFAULT '', | |
`upload_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | |
`parent_id` int(10) unsigned DEFAULT NULL, | |
PRIMARY KEY (`directory_id`), | |
UNIQUE KEY `IDX_DIRECTORY_PATH` (`name`, `path`), | |
KEY `parent_id` (`parent_id`), | |
CONSTRAINT `FK_DIRECTORY_PARENT_ID` FOREIGN KEY (`parent_id`) | |
REFERENCES core_directory_storage (`directory_id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Directory storage'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment