split db schema

This commit is contained in:
2024-11-22 23:26:19 -06:00
parent 9232db7cb0
commit fa1b3aaecf
3 changed files with 11 additions and 9 deletions

View File

@@ -2,21 +2,13 @@ import { relations, sql } from "drizzle-orm";
import {
index,
integer,
pgTableCreator,
primaryKey,
text,
timestamp,
varchar,
} from "drizzle-orm/pg-core";
import { type AdapterAccount } from "next-auth/adapters";
/**
* This is an example of how to use the multi-project schema feature of Drizzle ORM. Use the same
* database instance for multiple projects.
*
* @see https://orm.drizzle.team/docs/goodies#multi-project-schema
*/
export const createTable = pgTableCreator((name) => `ls_${name}`);
import { createTable } from "~/server/db/schema/create-table";
export const users = createTable("user", {
id: varchar("id", { length: 255 })

View File

@@ -0,0 +1,9 @@
import { pgTableCreator } from "drizzle-orm/pg-core";
/**
* This is an example of how to use the multi-project schema feature of Drizzle ORM. Use the same
* database instance for multiple projects.
*
* @see https://orm.drizzle.team/docs/goodies#multi-project-schema
*/
export const createTable = pgTableCreator((name) => `ls_${name}`);

View File

@@ -0,0 +1 @@
export * from "./auth";