-
Notifications
You must be signed in to change notification settings - Fork 82
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
A way to provide schema migration in dev startup #30
Comments
Remember that, according the answer, it will be a prod db connection with sqlite (or mongodb).. `` @module({ |
The issue is not more an optional, because we have to provide a migration with typeORM for scripts in dev mode running for sqlite |
Consider feature/migration-db and this src/ormconfig.ts:
|
I wouldn't want to have another question for this. Can we do it with flag
or vis JDL?
Thanks & Regards,
Deepu
…On Mon, Sep 2, 2019 at 1:28 PM Angelo Manganiello ***@***.***> wrote:
Consider feature/migration-db
<https://github.com/jhipster/generator-jhipster-nodejs/tree/feature/migration-db>
and this *src/ormconfig.ts*:
import { ConnectionOptions } from 'typeorm'; const config: ConnectionOptions = { type: 'postgres', host: process.env.POSTGRES_HOST, port: Number(process.env.POSTGRES_PORT), username: process.env.POSTGRES_USER, password: process.env.POSTGRES_PASSWORD, database: process.env.POSTGRES_DB, entities: [ __dirname + '/../**/*.entity{.ts,.js}', ], cli: { migrationsDir: 'src/migrations', }}; export = config;
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#30?email_source=notifications&email_token=AAIOKF7UHHBHOLZPDDR3JK3QHT2HFA5CNFSM4IPJDR5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5VRWXQ#issuecomment-527113054>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIOKF5FNEH5HFC2Z3A3M53QHT2HFANCNFSM4IPJDR5A>
.
|
Hi @deepu105, |
Ok in that case I
Thanks & Regards,
Deepu
…On Mon, Sep 2, 2019 at 2:02 PM Angelo Manganiello ***@***.***> wrote:
Hi @deepu105 <https://github.com/deepu105>,
now for this blueprint, in the server generator there are only two
questions: *serverPort* and *mongoProdDatabase* . The other prompts
questions for the server generation are been delated, because in this
blueprint they haven't sense to be due to their java spring meaning. So if
you answer to yes for the *mongoProdDatabase* there will generated the
config for this, otherwise the sqlite is the default. So be careful that
there aren't other database questions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30?email_source=notifications&email_token=AAIOKF37OOC3KA6VF77STVDQHT6FBA5CNFSM4IPJDR5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5VT7MQ#issuecomment-527122354>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIOKF35YYJFXCXPBYSMAPLQHT6FBANCNFSM4IPJDR5A>
.
|
A way to include mongodb in prod with db migration schema
The text was updated successfully, but these errors were encountered: