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 { pgTable, text, timestamp } from "drizzle-orm/pg-core";
3import googleDriveTokens from "./google-drive-tokens";
4import users from "./users";
5
6const googleDrive = pgTable("google_drive", {
7 id: text("xata_id").primaryKey().default(sql`xata_id()`),
8 googleDriveTokenId: text("google_drive_token_id")
9 .notNull()
10 .references(() => googleDriveTokens.id),
11 userId: text("user_id")
12 .notNull()
13 .references(() => users.id),
14 xataVersion: text("xata_version"),
15 createdAt: timestamp("xata_createdat").defaultNow().notNull(),
16 updatedAt: timestamp("xata_updatedat").defaultNow().notNull(),
17});
18
19export type SelectGoogleDrive = InferSelectModel<typeof googleDrive>;
20export type InsertGoogleDrive = InferInsertModel<typeof googleDrive>;
21
22export default googleDrive;