File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,19 @@ export class User extends Interfaces {
52
52
email : SecuredStringNullable ;
53
53
54
54
@NameField ( )
55
+ @DbLabel ( 'UserName' )
55
56
realFirstName : SecuredString ;
56
57
57
58
@NameField ( )
59
+ @DbLabel ( 'UserName' )
58
60
realLastName : SecuredString ;
59
61
60
62
@NameField ( )
63
+ @DbLabel ( 'UserName' )
61
64
displayFirstName : SecuredString ;
62
65
63
66
@NameField ( )
67
+ @DbLabel ( 'UserName' )
64
68
displayLastName : SecuredString ;
65
69
66
70
@Field ( )
Original file line number Diff line number Diff line change
1
+ import { BaseMigration , Migration } from '~/core/database' ;
2
+
3
+ @Migration ( '2024-06-21T09:00:00' )
4
+ export class AddUserNameLabelMigration extends BaseMigration {
5
+ async up ( ) {
6
+ await this . db . query ( ) . raw `
7
+ call {
8
+ match ()-[:realFirstName { active: true }]->(node:Property) return node
9
+ union
10
+ match ()-[:realLastName { active: true }]->(node:Property) return node
11
+ union
12
+ match ()-[:displayFirstName { active: true }]->(node:Property) return node
13
+ union
14
+ match ()-[:displayLastName { active: true }]->(node:Property) return node
15
+ }
16
+ set node:UserName
17
+ ` . executeAndLogStats ( ) ;
18
+ }
19
+ }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { EducationModule } from './education/education.module';
13
13
import { KnownLanguageRepository } from './known-language.repository' ;
14
14
import { KnownLanguageResolver } from './known-language.resolver' ;
15
15
import { AddActorLabelMigration } from './migrations/add-actor-label.migration' ;
16
+ import { AddUserNameLabelMigration } from './migrations/add-user-name-label.migration' ;
16
17
import { SystemAgentEdgeDBRepository } from './system-agent.edgedb.repository' ;
17
18
import { SystemAgentNeo4jRepository } from './system-agent.neo4j.repository' ;
18
19
import { SystemAgentRepository } from './system-agent.repository' ;
@@ -49,6 +50,7 @@ import { UserService } from './user.service';
49
50
provide : SystemAgentRepository ,
50
51
} ,
51
52
AddActorLabelMigration ,
53
+ AddUserNameLabelMigration ,
52
54
] ,
53
55
exports : [
54
56
UserService ,
You can’t perform that action at this time.
0 commit comments