[DB] Remove unique constraint from GSActor.nickname and fix register and related functionality

This commit is contained in:
2021-04-11 11:03:32 +00:00
parent 68de1b09b1
commit faa362e2e2
6 changed files with 31 additions and 23 deletions

View File

@@ -296,10 +296,7 @@ class GSActor extends Entity
'modified' => ['type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'],
],
'primary key' => ['id'],
'unique keys' => [
'gsactor_nickname_uniq' => ['nickname'],
],
'indexes' => [
'indexes' => [
'gsactor_nickname_idx' => ['nickname'],
],
'fulltext indexes' => [

View File

@@ -358,7 +358,7 @@ class LocalUser extends Entity implements UserInterface
'description' => 'local users, bots, etc',
'fields' => [
'id' => ['type' => 'int', 'foreign key' => true, 'target' => 'GSActor.id', 'multiplicity' => 'one to one', 'not null' => true, 'description' => 'foreign key to gsactor table'],
'nickname' => ['type' => 'varchar', 'foreign key' => true, 'target' => 'GSActor.nickname', 'multiplicity' => 'one to one', 'not null' => true, 'length' => 64, 'description' => 'nickname or username, foreign key to gsactor'],
'nickname' => ['type' => 'varchar', 'not null' => true, 'length' => 64, 'description' => 'nickname or username, foreign key to gsactor'],
'password' => ['type' => 'varchar', 'length' => 191, 'description' => 'salted password, can be null for users with federated authentication'],
'outgoing_email' => ['type' => 'varchar', 'length' => 191, 'description' => 'email address for password recovery, notifications, etc.'],
'incoming_email' => ['type' => 'varchar', 'length' => 191, 'description' => 'email address for post-by-email'],