feat: add cross-album search, auto-rules, album UI redesign, editorial archiving and pdf download
This commit is contained in:
1 parent
9c0d43b1ec
commit
375e5b8b7d
23 files changed
+1153
-43
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { sql } from "drizzle-orm";
|
||||
import { index, pgTable, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
||||
|
||||
import { users } from "./auth";
|
||||
import { editorialAccounts } from "./editorials";
|
||||
|
||||
export const albumAutoRules = pgTable(
|
||||
"album_auto_rules",
|
||||
{
|
||||
id: uuid("id").defaultRandom().primaryKey(),
|
||||
editorialAccountId: uuid("editorial_account_id")
|
||||
.notNull()
|
||||
.references(() => editorialAccounts.id, { onDelete: "restrict" }),
|
||||
keyword: text("keyword").notNull(),
|
||||
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
||||
createdByUserId: uuid("created_by_user_id").references(() => users.id, {
|
||||
onDelete: "restrict",
|
||||
}),
|
||||
},
|
||||
(table) => [
|
||||
uniqueIndex("album_auto_rules_editorial_account_id_keyword_idx").on(
|
||||
table.editorialAccountId,
|
||||
sql`lower(${table.keyword})`,
|
||||
),
|
||||
],
|
||||
);
|
||||
Reference in new issue
Block a user