A decentralized music tracking and discovery platform built on AT Protocol 馃幍
rocksky.app
spotify
atproto
lastfm
musicbrainz
scrobbling
listenbrainz
1import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm";
2import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
3
4const genres = sqliteTable("genres", {
5 id: text("id").primaryKey().notNull(),
6 name: text("name").unique().notNull(),
7 createdAt: integer("created_at", { mode: "timestamp" })
8 .notNull()
9 .default(sql`(unixepoch())`),
10 updatedAt: integer("updated_at", { mode: "timestamp" })
11 .notNull()
12 .default(sql`(unixepoch())`),
13});
14
15export type SelectGenre = InferSelectModel<typeof genres>;
16export type InsertGenre = InferInsertModel<typeof genres>;
17
18export default genres;