mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 20:24:27 -04:00
Add indexes on the movie type
This commit is contained in:
parent
f756c001e5
commit
26470136af
@ -2,6 +2,7 @@ import { relations, sql } from "drizzle-orm";
|
|||||||
import {
|
import {
|
||||||
check,
|
check,
|
||||||
date,
|
date,
|
||||||
|
index,
|
||||||
integer,
|
integer,
|
||||||
jsonb,
|
jsonb,
|
||||||
primaryKey,
|
primaryKey,
|
||||||
@ -85,6 +86,10 @@ export const shows = schema.table(
|
|||||||
(t) => [
|
(t) => [
|
||||||
check("rating_valid", sql`${t.rating} between 0 and 100`),
|
check("rating_valid", sql`${t.rating} between 0 and 100`),
|
||||||
check("runtime_valid", sql`${t.runtime} >= 0`),
|
check("runtime_valid", sql`${t.runtime} >= 0`),
|
||||||
|
|
||||||
|
index("kind").using("hash", t.kind),
|
||||||
|
index("rating").on(t.rating),
|
||||||
|
index("startAir").on(t.startAir),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user