A decentralized music tracking and discovery platform built on AT Protocol 馃幍 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz
at main 20 lines 944 B view raw
1import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; 2import { pgTable, text, timestamp } from "drizzle-orm/pg-core"; 3import googleDriveDirectories from "./google-drive-directories"; 4 5const googleDrivePaths = pgTable("google_drive_paths", { 6 id: text("xata_id").primaryKey().default(sql`xata_id()`), 7 googleDriveId: text("google_drive_id").notNull(), 8 trackId: text("track_id").notNull(), 9 name: text("name").notNull(), 10 directoryId: text("directory_id").references(() => googleDriveDirectories.id), 11 fileId: text("file_id").notNull().unique(), 12 xataVersion: text("xata_version"), 13 createdAt: timestamp("xata_createdat").defaultNow().notNull(), 14 updatedAt: timestamp("xata_updatedat").defaultNow().notNull(), 15}); 16 17export type SelectGoogleDrivePaths = InferSelectModel<typeof googleDrivePaths>; 18export type InsertGoogleDrivePaths = InferInsertModel<typeof googleDrivePaths>; 19 20export default googleDrivePaths;