1919use Doctrine \Common \Collections \Collection ;
2020use Doctrine \Common \Collections \Criteria ;
2121use Doctrine \Common \Collections \Order ;
22+ use Doctrine \DBAL \Types \Types ;
2223use Doctrine \ORM \Mapping \Column ;
2324use Doctrine \ORM \Mapping \Entity ;
2425use Doctrine \ORM \Mapping \GeneratedValue ;
@@ -102,7 +103,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, Visibil
102103 public string $ email ;
103104 #[Column(type: 'string ' , unique: true , nullable: false )]
104105 public string $ username ;
105- #[Column(type: ' json ' , nullable: false , options: [ ' jsonb ' => true ] )]
106+ #[Column(type: Types:: JSONB , nullable: false )]
106107 public array $ roles = [];
107108 #[Column(type: 'integer ' , nullable: false )]
108109 public int $ followersCount = 0 ;
@@ -122,7 +123,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, Visibil
122123 public ?\DateTime $ lastActive = null ;
123124 #[Column(type: 'datetimetz ' , nullable: true )]
124125 public ?\DateTime $ markedForDeletionAt = null ;
125- #[Column(type: ' json ' , nullable: true , options: [ ' jsonb ' => true ] )]
126+ #[Column(type: Types:: JSONB , nullable: true )]
126127 public ?array $ fields = null ;
127128 #[Column(type: 'string ' , nullable: true )]
128129 public ?string $ oauthAzureId = null ;
@@ -146,7 +147,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, Visibil
146147 public ?string $ oauthAuthentikId = null ;
147148 #[Column(type: 'boolean ' , nullable: false , options: ['default ' => true ])]
148149 public bool $ hideAdult = true ;
149- #[Column(type: ' json ' , nullable: false , options: [' jsonb ' => true , 'default ' => '[] ' ])]
150+ #[Column(type: Types:: JSONB , nullable: false , options: ['default ' => '[] ' ])]
150151 public array $ preferredLanguages = [];
151152 #[Column(type: 'array ' , nullable: true )]
152153 public ?array $ featuredMagazines = null ;
@@ -252,7 +253,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, Visibil
252253 private string $ password ;
253254 #[Column(type: 'string ' , nullable: true )]
254255 private ?string $ totpSecret = null ;
255- #[Column(type: ' json ' , nullable: false , options: [' jsonb ' => true , 'default ' => '[] ' ])]
256+ #[Column(type: Types:: JSONB , nullable: false , options: ['default ' => '[] ' ])]
256257 private array $ totpBackupCodes = [];
257258 #[OneToMany(mappedBy: 'user ' , targetEntity: OAuth2UserConsent::class, orphanRemoval: true )]
258259 private Collection $ oAuth2UserConsents ;
0 commit comments