Skip to content

Commit 63e7f13

Browse files
Merge pull request #1529 from WillSquire/synchronize-warning-in-database-docs-1528
Added synchronize warning in database docs
2 parents 7f430cc + 54ec799 commit 63e7f13

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

content/recipes/sql-typeorm.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export const databaseProviders = [
3939
];
4040
```
4141

42-
> warning **Hint** Following best practices, we declared the custom provider in the separated file which has a `*.providers.ts` suffix.
42+
> warning **Warning** Setting `synchronize: true` shouldn't be used in production - otherwise you can lose production data.
43+
44+
> info **Hint** Following best practices, we declared the custom provider in the separated file which has a `*.providers.ts` suffix.
4345
4446
Then, we need to export these providers to make them **accessible** for the rest of the application.
4547

content/techniques/sql.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ import { TypeOrmModule } from '@nestjs/typeorm';
4040
export class AppModule {}
4141
```
4242

43+
> warning **Warning** Setting `synchronize: true` shouldn't be used in production - otherwise you can lose production data.
44+
4345
The `forRoot()` method supports all the configuration properties exposed by the `createConnection()` function from the [TypeORM](https://typeorm.io/#/connection-options) package. In addition, there are several extra configuration properties described below.
4446

4547
<table>

0 commit comments

Comments
 (0)