feat(core): Add migration to add property userActivated to user settings (no-changelog) (#5940)

* Add userActivated migration

* Fix migration logic

* Remove duplication when retrieving the activated users

* Fix bug updating settings in mysql

* Make userSettings type conform with naming convention

* Disable naming convention rule only in IDatabaseCollections interface

* Fix down method in Postgres migration

* Reset '{}' to NULL when reversing migration
This commit is contained in:
Ricardo Espinoza
2023-04-21 11:15:08 -04:00
committed by GitHub
parent ab12d3e327
commit 8a38624cbc
7 changed files with 189 additions and 1 deletions

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/naming-convention */
import type { Application } from 'express';
import type {
ExecutionError,
@@ -82,6 +81,7 @@ export interface ICredentialsOverwrite {
[key: string]: ICredentialDataDecryptedObject;
}
/* eslint-disable @typescript-eslint/naming-convention */
export interface IDatabaseCollections {
AuthIdentity: AuthIdentityRepository;
AuthProviderSyncHistory: AuthProviderSyncHistoryRepository;
@@ -103,6 +103,7 @@ export interface IDatabaseCollections {
WorkflowStatistics: WorkflowStatisticsRepository;
WorkflowTagMapping: WorkflowTagMappingRepository;
}
/* eslint-enable @typescript-eslint/naming-convention */
// ----------------------------------
// tags
@@ -789,3 +790,5 @@ export interface N8nApp {
externalHooks: IExternalHooksClass;
activeWorkflowRunner: ActiveWorkflowRunner;
}
export type UserSettings = Pick<User, 'id' | 'settings'>;