pohja/schema/resources-000.sql

18 lines
722 B
MySQL
Raw Normal View History

2024-03-22 17:04:46 +01:00
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`);