-
Notifications
You must be signed in to change notification settings - Fork 0
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
migration: postgres #470
migration: postgres #470
Conversation
@@ -64,7 +66,7 @@ export class SearchQueryPipe implements PipeTransform { | |||
|
|||
if (query.email) { | |||
if (typeof query.email === 'string' && checkValidEmail(query.email)) { | |||
filters.emails = { $regex: new RegExp(`^${query.email}$`, 'i') }; | |||
filters.emails = ArrayContains([query.email]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est bien case insensitive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maintenant oui
apps/cron/src/cron.module.ts
Outdated
keepConnectionAlive: true, | ||
schema: 'public', | ||
migrationsRun: true, | ||
migrations: [Initialization1724762471013], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a besoin de run la migration d'initialisation dans le CRON si elle est déjà faite par l'API? Je pense que ça serait mieux de laisser toutes les migrations côté API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Négatif, c'est l'appli qui démare en première qui init la DB
@@ -53,36 +44,11 @@ export class CronService { | |||
|
|||
@Cron(CronExpression.EVERY_DAY_AT_2AM) | |||
async removeSoftDeletedBALsOlderThanOneYear() { | |||
console.debug('Task start : purge old deleted BALs'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On laisse pas les logs? ça peut toujours être util
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas besoin, normalement il y a deja de console.log dans TaskQueue
@@ -74,12 +80,15 @@ | |||
"mongodb": "^6.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On peut virer mongodb non? et le plugin mongoose lean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je vais dégager mongoose plutot dont on a pas besoin, mongodb obligatoire pour ObjectId
Context
Changement de la stack, on remplace mongodb par postgres grace a typeorm