17 lines
722 B
SQL
17 lines
722 B
SQL
CREATE TABLE IF NOT EXISTS `resources` (
|
|
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
`name` TEXT NOT NULL,
|
|
`type` TEXT NOT NULL,
|
|
`blurhash` TEXT DEFAULT NULL,
|
|
`url` TEXT NOT NULL,
|
|
`width` INTEGER DEFAULT NULL,
|
|
`height` INTEGER DEFAULT NULL,
|
|
`hasBeenProcessed` INTEGER DEFAULT 0,
|
|
`modified` TEXT NOT NULL
|
|
);
|
|
|
|
CREATE UNIQUE INDEX IF NOT EXISTS `resources_name` ON `resources` (`name`);
|
|
CREATE INDEX IF NOT EXISTS `resources_blurhash` ON `resources` (`blurhash`);
|
|
CREATE INDEX IF NOT EXISTS `resources_type` ON `resources` (`type`);
|
|
CREATE INDEX IF NOT EXISTS `resources_hasBeenProcessed` ON `resources` (`hasBeenProcessed`);
|
|
CREATE INDEX IF NOT EXISTS `resources_modified` ON `resources` (`modified`);
|