Skip to content

Commit

Permalink
match seed command in docker-entrypoint and dbsetup too
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Jan 24, 2025
1 parent fd9d659 commit 1371adb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion templates/docker-entrypoint.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ if (process.env.DATABASE_URL) {
<%= tab(n) %>await exec('<%= npx %> prisma migrate deploy')
<% } -%>
<% if (prismaSeed && sqlite3 && (prismaFile || prismaEnv)) { -%>
<%= tab(n) %>if (newDb) await exec('npx prisma db seed')
<%= tab(n) %>if (newDb) await exec(<%- JSON.stringify(prismaSeed) %>)
<% } -%>
<% } -%>
<% if (nextjsGeneration) { -%>
Expand Down
2 changes: 1 addition & 1 deletion test/base/windows/docker-entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const env = { ...process.env }
const target = url.protocol === 'file:' && url.pathname
const newDb = target && !fs.existsSync(target)
await exec('npx prisma migrate deploy')
if (newDb) await exec('npx prisma db seed')
if (newDb) await exec("ts-node --require tsconfig-paths/register prisma/seed.ts")

Check failure on line 15 in test/base/windows/docker-entrypoint.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote

Check failure on line 15 in test/base/windows/docker-entrypoint.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote
}

// launch application
Expand Down
2 changes: 1 addition & 1 deletion test/frameworks/nuxt-prisma/docker-entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const env = { ...process.env }

// prepare database
await exec('npx prisma migrate deploy')
if (newDb) await exec('npx prisma db seed')
if (newDb) await exec("node prisma/seed.js")

Check failure on line 26 in test/frameworks/nuxt-prisma/docker-entrypoint.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote

Check failure on line 26 in test/frameworks/nuxt-prisma/docker-entrypoint.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote
}

// launch application
Expand Down
2 changes: 1 addition & 1 deletion test/frameworks/remix-indie/docker-entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const env = { ...process.env }
const target = url.protocol === 'file:' && url.pathname
const newDb = target && !fs.existsSync(target)
await exec('npx prisma migrate deploy')
if (newDb) await exec('npx prisma db seed')
if (newDb) await exec("ts-node --require tsconfig-paths/register prisma/seed.ts")

Check failure on line 15 in test/frameworks/remix-indie/docker-entrypoint.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote

Check failure on line 15 in test/frameworks/remix-indie/docker-entrypoint.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote
}

// launch application
Expand Down
2 changes: 1 addition & 1 deletion test/frameworks/svelte-prisma/docker-entrypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (process.argv.slice(-2).join(' ') === 'node ./build/index.js') {

// prepare database
await exec('npx prisma migrate deploy')
if (newDb) await exec('npx prisma db seed')
if (newDb) await exec("tsx prisma/seed.ts")

Check failure on line 19 in test/frameworks/svelte-prisma/docker-entrypoint.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote

Check failure on line 19 in test/frameworks/svelte-prisma/docker-entrypoint.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote
}

// launch application
Expand Down

0 comments on commit 1371adb

Please sign in to comment.