Further updated on caching. Small change in DB schema to make lookups a bit more performant. Note that if DB migration in the last commit has been run, this commit will need manual update of the database.
This commit is contained in:
parent
ef0464bbc9
commit
3e3c3a24fe
4 changed files with 20 additions and 23 deletions
|
@ -2,12 +2,12 @@ exports.up = (knex, Promise) => (async() => {
|
|||
await knex.schema.raw('CREATE TABLE `file_cache` (\n' +
|
||||
' `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n' +
|
||||
' `type` varchar(255) NOT NULL,\n' +
|
||||
' `url` text NOT NULL,\n' +
|
||||
' `key` varchar(255) NOT NULL,\n' +
|
||||
' `mimetype` varchar(255) DEFAULT NULL,\n' +
|
||||
' `size` int(11) DEFAULT NULL,\n' +
|
||||
' `created` timestamp NOT NULL DEFAULT current_timestamp(),\n' +
|
||||
' PRIMARY KEY (`id`),\n' +
|
||||
' KEY `url` (`url`(191))\n' +
|
||||
' KEY `key` (`key`(191))\n' +
|
||||
') ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;');
|
||||
})();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue