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

Introduce make command to generate migration files #68

Merged
merged 23 commits into from
Jun 7, 2020

Conversation

kabirbaidhya
Copy link
Contributor

@kabirbaidhya kabirbaidhya commented May 17, 2020

The make command

  • Introduce make command to generate migration files.
  • If it receives an argument in the form create_<something>_table then it will use the create table template for the file otherwise blank migration files are generated.
  • In future it could support creating other DB objects like views, functions, etc with an optional option --type given

Other chnages

  • Add ts utili function, few more tests
  • Remove CLI tests from test coverage - it's not needed and it took very long time for the tests.

Preview

$ sync-db make create_test_table

image

$ sync-db make somethingelse

image

@kabirbaidhya kabirbaidhya self-assigned this May 17, 2020
@kabirbaidhya kabirbaidhya marked this pull request as ready for review June 7, 2020 11:05
src/util/string.ts Outdated Show resolved Hide resolved
src/service/fileMaker.ts Show resolved Hide resolved
Co-authored-by: Anish Silwal Khatri <anishsilwal@lftechnology.com>
@kabirbaidhya kabirbaidhya merged commit 93f5773 into experimental Jun 7, 2020
@kabirbaidhya kabirbaidhya deleted the make-migration branch June 7, 2020 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants