-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Vafilor/feat/image-cache
Add image caching and local database
- Loading branch information
Showing
31 changed files
with
1,322 additions
and
179 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { Config } from 'drizzle-kit'; | ||
|
||
export default { | ||
schema: './src/db/schema/*', | ||
out: './drizzle', | ||
driver: 'better-sqlite', | ||
} satisfies Config; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CREATE TABLE `image_cache` ( | ||
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
`key` text NOT NULL, | ||
`last_modified_time_ms` integer NOT NULL, | ||
`cache_path` text NOT NULL | ||
); | ||
--> statement-breakpoint | ||
CREATE UNIQUE INDEX `image_cache_key_unique` ON `image_cache` (`key`);--> statement-breakpoint | ||
CREATE INDEX `key_index` ON `image_cache` (`key`); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"version": "5", | ||
"dialect": "sqlite", | ||
"id": "5075dd4b-d9a9-4feb-86f0-7a014e1df027", | ||
"prevId": "00000000-0000-0000-0000-000000000000", | ||
"tables": { | ||
"image_cache": { | ||
"name": "image_cache", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "integer", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"autoincrement": true | ||
}, | ||
"key": { | ||
"name": "key", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"last_modified_time_ms": { | ||
"name": "last_modified_time_ms", | ||
"type": "integer", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
}, | ||
"cache_path": { | ||
"name": "cache_path", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"autoincrement": false | ||
} | ||
}, | ||
"indexes": { | ||
"image_cache_key_unique": { | ||
"name": "image_cache_key_unique", | ||
"columns": [ | ||
"key" | ||
], | ||
"isUnique": true | ||
}, | ||
"key_index": { | ||
"name": "key_index", | ||
"columns": [ | ||
"key" | ||
], | ||
"isUnique": false | ||
} | ||
}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": {} | ||
} | ||
}, | ||
"enums": {}, | ||
"_meta": { | ||
"schemas": {}, | ||
"tables": {}, | ||
"columns": {} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"version": "5", | ||
"dialect": "sqlite", | ||
"entries": [ | ||
{ | ||
"idx": 0, | ||
"version": "5", | ||
"when": 1705690187768, | ||
"tag": "0000_brave_garia", | ||
"breakpoints": true | ||
} | ||
] | ||
} |
This file contains 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
Oops, something went wrong.