Refactor database module to disable synchronization in production

This commit is contained in:
Jose Eduardo 2025-08-12 09:09:19 -04:00
parent 44d21423db
commit 4c8b331be0

View File

@ -15,7 +15,7 @@ import { Payment } from '../payments/entities/payment.entity';
password: configService.get('database.password'), password: configService.get('database.password'),
database: configService.get('database.database'), database: configService.get('database.database'),
entities: [Payment], entities: [Payment],
synchronize: process.env.NODE_ENV !== 'production', // Apenas para desenvolvimento synchronize: false, // Apenas para desenvolvimento
logging: process.env.NODE_ENV === 'development', logging: process.env.NODE_ENV === 'development',
}), }),
inject: [ConfigService], inject: [ConfigService],