Skip to content

Commit

Permalink
fix(db): Fixed prisma error on db migration and added env option to…
Browse files Browse the repository at this point in the history
… not generate sync schema (for CI)
  • Loading branch information
Blckbrry-Pi committed Mar 7, 2024
1 parent f30e8f5 commit 70888dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/build/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ async function buildSteps(
// TODO: Also watch migrations folder in case a migration is created/destroyed
files: [resolve(module.path, "db", "schema.prisma")],
async build() {
if (module.registry.isExternal) {
if (module.registry.isExternal || Deno.env.get("CI") === "true") {
// Do not alter migrations, only deploy them
await migrateDeploy(project, [module]);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/migrate/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export async function runPrismaCommand(
const prismaOutput = await new Deno.Command("docker", {
args: [
"exec",
"-ii",
...(Deno.stdin.isTerminal() ? ["-it"] : []),
"--workdir=/prisma/db",
`--user=node:node`,
...envFlags,
Expand Down

0 comments on commit 70888dc

Please sign in to comment.