Skip to content

Commit efce9bd

Browse files
authored
Merge pull request #211 from AthennaIO/develop
fix: adjust migration name
2 parents 98410ce + d711303 commit efce9bd

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenna/database",
3-
"version": "5.31.0",
3+
"version": "5.32.0",
44
"description": "The Athenna database handler for SQL/NoSQL.",
55
"license": "MIT",
66
"author": "João Lenon <lenon@athenna.io>",

src/commands/MakeMigrationCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class MakeMigrationCommand extends BaseCommand {
3232
const nameCamel = String.toCamelCase(this.name)
3333
const namePlural = String.pluralize(this.name)
3434
const namePascal = String.toPascalCase(this.name)
35+
const nameSnake = String.toSnakeCase(this.name)
3536
const namePluralCamel = String.toCamelCase(String.pluralize(this.name))
3637
const namePluralPascal = String.toPascalCase(String.pluralize(this.name))
3738

@@ -53,7 +54,7 @@ export class MakeMigrationCommand extends BaseCommand {
5354
time = time.split('.')[0].replace(/:/g, '')
5455

5556
const file = await this.generator
56-
.fileName(`${sep}${date}_${time}_create_${tableName}_table`)
57+
.fileName(`${sep}${date}_${time}_${nameSnake}`)
5758
.destination(destination)
5859
.properties({
5960
nameUp,

0 commit comments

Comments
 (0)