Skip to content

Commit eed6e50

Browse files
committed
Added synchronize warning in database docs
1 parent d59d729 commit eed6e50

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

content/recipes/sql-typeorm.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export const databaseProviders = [
3939
];
4040
```
4141

42+
> warning **Warning** Setting `synchronize: true` shouldn't be used in production - otherwise you can lose production data.
43+
4244
> warning **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.

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)