feat(integration): add search engine creation (#1816)

Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
Manuel
2024-12-31 11:40:37 +01:00
committed by GitHub
parent aeb681a858
commit f5076454cd
16 changed files with 3398 additions and 5 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE `search_engine` ADD CONSTRAINT `search_engine_short_unique` UNIQUE(`short`);

File diff suppressed because it is too large Load Diff

View File

@@ -127,6 +127,13 @@
"when": 1733777544067,
"tag": "0017_tired_penance",
"breakpoints": true
},
{
"idx": 18,
"version": "5",
"when": 1735593853768,
"tag": "0018_mighty_shaman",
"breakpoints": true
}
]
}

View File

@@ -0,0 +1 @@
CREATE UNIQUE INDEX `search_engine_short_unique` ON `search_engine` (`short`);

File diff suppressed because it is too large Load Diff

View File

@@ -127,6 +127,13 @@
"when": 1733777395703,
"tag": "0017_small_rumiko_fujikawa",
"breakpoints": true
},
{
"idx": 18,
"version": "6",
"when": 1735593831501,
"tag": "0018_cheerful_tattoo",
"breakpoints": true
}
]
}

View File

@@ -389,7 +389,7 @@ export const searchEngines = mysqlTable("search_engine", {
id: varchar({ length: 64 }).notNull().primaryKey(),
iconUrl: text().notNull(),
name: varchar({ length: 64 }).notNull(),
short: varchar({ length: 8 }).notNull(),
short: varchar({ length: 8 }).unique().notNull(),
description: text(),
urlTemplate: text(),
type: varchar({ length: 64 }).$type<SearchEngineType>().notNull().default("generic"),

View File

@@ -375,7 +375,7 @@ export const searchEngines = sqliteTable("search_engine", {
id: text().notNull().primaryKey(),
iconUrl: text().notNull(),
name: text().notNull(),
short: text().notNull(),
short: text().unique().notNull(),
description: text(),
urlTemplate: text(),
type: text().$type<SearchEngineType>().notNull().default("generic"),