vaultwarden/migrations/postgresql
BlackDex 18d66474e0
Fix External ID not set during DC Sync
While working on the fix I realised the location where the `external_id`
is stored was wrong. It was stored in the `users` table, but it actually
should have been stored in the `users_organizations` table.

This will move the column to the right table. It will not move the
values of the `external_id` column, because if there are more
organizations, there is no way to really know which organization it is
linked to. Setups using the Directory Connector can clear the sync
cache, and sync again, that will store all the `external_id` values at
the right location.

Also changed the function to revoke,restore an org-user and set_external_id to return a boolean.
It will state if the value has been changed or not, and if not, we can
prevent a `save` call to the database.

The `users` table is not changed to remove the `external_id` column, thi
to prevent issue when users want to revert back to an earlier version
for some reason. We can do this after a few minor release i think.

Fixes #3777
2023-10-21 13:54:48 +02:00
..
2019-09-12-100000_create_tables Adds support for PostgreSQL which resolves #87 and is mentioned in #246. 2019-09-12 16:12:22 -04:00
2019-09-16-150000_fix_attachments Added a migration that fixes #1 which caused attachments to be broken 2019-09-16 19:52:00 -04:00
2019-10-10-083032_add_column_to_twofactor Updated authenticator TOTP 2019-10-10 17:32:20 +02:00
2019-11-17-011009_add_email_verification Implement change-email, email-verification, account-recovery, and welcome notifications 2019-11-24 22:28:49 -07:00
2020-03-13-205045_add_policy_table Initial version of policies 2020-03-14 13:32:28 +01:00
2020-04-09-235005_add_cipher_delete_date Initial support for soft deletes 2020-04-17 22:35:27 +02:00
2020-07-01-214531_add_hide_passwords Add support for hiding passwords in a collection 2020-07-02 21:51:20 -07:00
2020-08-02-025025_add_favorites_table Transfer favorite status for user-owned ciphers 2020-08-22 17:14:05 -07:00
2020-11-30-224000_add_user_enabled Implement admin ability to enable/disable users 2020-11-30 23:12:56 +01:00
2020-12-09-173101_add_stamp_exception Fix Key Rotation during password change 2020-12-14 19:58:23 +01:00
2021-03-11-190243_add_sends Send API 2021-03-14 23:35:55 +01:00
2021-03-15-163412_rename_send_key rename send key -> akey 2021-03-15 16:42:20 +01:00
2021-04-30-233251_add_reprompt Add support for password reprompt 2021-05-11 20:09:57 -07:00
2021-05-11-205202_add_hide_email Add support for hiding the sender's email address in Bitwarden Sends 2021-05-11 22:51:12 -07:00
2021-07-01-203140_add_password_reset_keys Added web-vault v2.21.x support + some misc fixes 2021-07-04 23:02:56 +02:00
2021-08-30-193501_create_emergency_access [PATCH] Some fixes to the Emergency Access PR 2021-09-17 01:25:47 +02:00
2021-10-24-164321_add_2fa_incomplete Fix PostgreSQL migration 2021-10-31 17:50:00 -07:00
2022-01-17-234911_add_api_key Add support for API keys 2022-01-21 23:10:11 -08:00
2022-03-02-210038_update_devices_primary_key Update login API code 2022-03-12 18:45:45 +01:00
2022-07-27-110000_add_group_support group support 2022-10-20 15:31:53 +02:00
2022-10-18-170602_add_events Add Organizational event logging feature 2022-11-27 23:36:34 +01:00
2023-01-06-151600_add_reset_password_support added database migration 2023-01-25 08:06:21 +01:00
2023-01-11-205851_add_avatar_color Add avatar color support 2023-01-11 22:20:03 +01:00
2023-01-31-222222_add_argon2 add argon2 kdf fields 2023-02-07 13:52:52 -05:00
2023-02-18-125735_push_uuid_table feat: Push Notifications 2023-06-11 13:28:18 +02:00
2023-06-02-200424_create_organization_api_key Merge and modify PR from @Kurnihil 2023-06-13 08:51:07 +02:00
2023-06-17-200424_create_auth_requests_table Implement login-with-device 2023-08-13 17:54:18 +02:00
2023-06-28-133700_add_collection_external_id Added-External_id for Collections 2023-07-04 20:26:03 +02:00
2023-09-01-170620_update_auth_request_table Fix Login With Device without MasterPassword 2023-09-01 21:03:50 +02:00
2023-09-02-212336_move_user_external_id Fix External ID not set during DC Sync 2023-10-21 13:54:48 +02:00