Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to create a new migration file #62

Closed
Sharaal opened this issue Sep 13, 2021 · 0 comments
Closed

Add command to create a new migration file #62

Sharaal opened this issue Sep 13, 2021 · 0 comments

Comments

@Sharaal
Copy link
Owner

Sharaal commented Sep 13, 2021

Acceptance criteria

  • To be similar to knex the name of the command should be migrate:make
  • As parameter the name is supported
  • If the name doesn't have a file ending, .sql is used as default
  • The current unix timestamp is added as prefix to the name
  • Depending on the file ending a different template is used as file content:
    • .js:
    module.exports = async sql => sql.query(
      sql``
    )
    
    • .sql: empty file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant