Skip to content

Commit

Permalink
create only
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Dec 28, 2024
1 parent 45fa1af commit a3ac61a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fly.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ GDF.extend(class extends GDF {
}

// ensure that there is at least one migration present
if (this.prismaSeed && !fs.existsSync(path.join(this._appdir, 'prisma/migrations'))) {
if (!fs.existsSync(path.join(this._appdir, 'prisma/migrations'))) {
if (this.prismaFile && !fs.existsSync(path.join(this._appdir, 'prisma', this.prismaFile)) && fs.existsSync(path.join(this._appdir, 'node_modules'))) {
execSync(`${this.npx} prisma migrate dev --name init`, { stdio: 'inherit' })
execSync(`${this.npx} prisma migrate dev --name init --create-only`, { stdio: 'inherit' })
} else {
console.error(chalk.bold.red('\nNo migrations found. Please run `npx prisma migrate dev` to create an initial migration.'))
this.setExit(42)
Expand Down

0 comments on commit a3ac61a

Please sign in to comment.