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

Generate SQL commands #269

Open
gerwinbrunner opened this issue May 16, 2023 · 1 comment
Open

Generate SQL commands #269

gerwinbrunner opened this issue May 16, 2023 · 1 comment

Comments

@gerwinbrunner
Copy link

Is there a way to generate a SQL file of all the commands instead of running them directly in the db?
Something like the SCHEMA file that RubyOnRails creates.

We are trying to improve the speed of DB preparation for automated testing.
Currently the seed takes >1min to run. So If we could generate the SQL in an upfront step, then we could potentially save some time (30sec)

Any idea how this could be done.

@jorgebodega
Copy link
Owner

Probably what you are looking for should be on TypeORM (synchronize option), probably generating all the schema at once that could be done with a simple command.

If your problem is that you already have the schema and need the seeding on SQL, I'm sorry, but the library currently doesn't have any functionality like that (and don't expect in short term, I'm out of time).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants