mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
move schemas to folder
This commit is contained in:
@@ -18,7 +18,7 @@ RUN echo "export const build = \"$BUILD\" as any;" > server/build.ts
|
|||||||
# if the build is oss then remove the server/private directory
|
# if the build is oss then remove the server/private directory
|
||||||
RUN if [ "$BUILD" = "oss" ]; then rm -rf server/private; fi
|
RUN if [ "$BUILD" = "oss" ]; then rm -rf server/private; fi
|
||||||
|
|
||||||
RUN if [ "$DATABASE" = "pg" ]; then npx drizzle-kit generate --dialect postgresql --schema ./server/db/pg/schema.ts --out init; else npx drizzle-kit generate --dialect $DATABASE --schema ./server/db/$DATABASE/schema.ts --out init; fi
|
RUN if [ "$DATABASE" = "pg" ]; then npx drizzle-kit generate --dialect postgresql --schema ./server/db/pg/schema --out init; else npx drizzle-kit generate --dialect $DATABASE --schema ./server/db/$DATABASE/schema --out init; fi
|
||||||
|
|
||||||
RUN mkdir -p dist
|
RUN mkdir -p dist
|
||||||
RUN npm run next:build
|
RUN npm run next:build
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import { defineConfig } from "drizzle-kit";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
const schema = [
|
const schema = [
|
||||||
path.join("server", "db", "pg", "schema.ts"),
|
path.join("server", "db", "pg", "schema"),
|
||||||
path.join("server", "db", "pg", "privateSchema.ts")
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ import { defineConfig } from "drizzle-kit";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
const schema = [
|
const schema = [
|
||||||
path.join("server", "db", "sqlite", "schema.ts"),
|
path.join("server", "db", "sqlite", "schema"),
|
||||||
path.join("server", "db", "sqlite", "privateSchema.ts")
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export * from "./driver";
|
export * from "./driver";
|
||||||
export * from "./schema";
|
export * from "./schema/schema";
|
||||||
export * from "./privateSchema";
|
export * from "./schema/privateSchema";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { drizzle as DrizzleSqlite } from "drizzle-orm/better-sqlite3";
|
import { drizzle as DrizzleSqlite } from "drizzle-orm/better-sqlite3";
|
||||||
import Database from "better-sqlite3";
|
import Database from "better-sqlite3";
|
||||||
import * as schema from "./schema";
|
import * as schema from "./schema/schema";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import { APP_PATH } from "@server/lib/consts";
|
import { APP_PATH } from "@server/lib/consts";
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export * from "./driver";
|
export * from "./driver";
|
||||||
export * from "./schema";
|
export * from "./schema/schema";
|
||||||
export * from "./privateSchema";
|
export * from "./schema/privateSchema";
|
||||||
|
|||||||
Reference in New Issue
Block a user