1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00
bitwarden-server/util/SqliteMigrations/Migrations
Rui Tomé f5caecc6d6
[AC-1722] Deprecate "Edit/Delete Assigned Collections" custom permissions (#4604)
* Add SQL script to migrate custom users with specific permissions to User type

Remove 'editAssignedCollections' and 'deleteAssignedCollections' properties from Permissions in OrganizationUser table. Migrate custom users who only have these permissions to the User type.

* Add MySQL migration to migrate custom users with specific permissions to User type

* Add Postgres migration to migrate custom users with specific permissions to User type

* Add Sqlite migration to migrate custom users with specific permissions to User type

* Update AutoFixture usage in tests to resolve creating ILogger mock instances

* Update EF integration tests database contexts to use each respective Migrations assembly. Configure Sqlite instance

* Add RunMigration method to BaseEntityFrameworkRepository

* Add FinalFlexibleCollectionsDataMigrationsTests

* Improve data migration efficiency by using OPENJSON instead of multiple JSON_EXTRACT

* Add batching to the sql data migrations

* Update DbMigrator to run a specific script based on its name

* Update DatabaseDataAttribute to be able to test a specific migration

* Add reference to the migration projects to Infrastructure.IntegrationTest

* Add integration test to test the migration FinalFlexibleCollectionsDataMigrations

* Remove EFIntegration tests and remove RunMigration method from BaseEntityFrameworkRepository

* Add IMigrationTesterService and implementations for SQL and EF migrations

* Add FinalFlexibleCollectionsDataMigrationsTests and remove test from OrganizationUserRepositoryTests

* Update sql data migration script based on performance feedback

* Bump date on EF migration scripts

* Add xmldoc comments to IMigrationTesterService and each implementation

* Bump up the date on the EF migration scripts

* Bump up dates on EF migrations

* Added tests to assert no unwanted changes are made to the permissions json. Refactor tests.

* Revert changes made to DbMigrator and refactor SqlMigrationTesterService to not use it.

* Add method description

* Fix test to assert no changes are made to custom user

* Remove unnecessary COALESCE and SELECT CASE

* Unident lines on SQL script

* Update DatabaseDataAttribute MigrationName property to be nullable

* Fix null reference checks

* Remove unnecessary COALESCE from Postgres script

* Bump dates on migration scripts

* Bump up dates on EF migrations

* Add migration tests for handling null

* Add test for non json values

* Fix test

* Remove migrations

* Recreate EF migrations

* Update Postgres data migration script to check for valid JSON in Permissions column

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2024-09-02 11:04:55 +01:00
..
20221212154007_initial.cs Resolve Vault and DB Warnings (#4646) 2024-08-27 19:05:34 -04:00
20221212154007_initial.Designer.cs Resolve Vault and DB Warnings (#4646) 2024-08-27 19:05:34 -04:00
20230106025949_AvatarColor.cs add sqlite migrations for avatar color (#2543) 2023-01-10 07:50:34 -05:00
20230106025949_AvatarColor.Designer.cs add sqlite migrations for avatar color (#2543) 2023-01-10 07:50:34 -05:00
20230106153919_SecretsManager.cs [SM-394] Secrets Manager (#2164) 2023-01-13 15:02:53 +01:00
20230106153919_SecretsManager.Designer.cs [SM-394] Secrets Manager (#2164) 2023-01-13 15:02:53 +01:00
20230112125615_ProviderAddProviderTypeBillingPhone.cs [EC-427] Add provider types (MSP/Reseller) to Provider table (#2518) 2023-01-23 16:08:05 +00:00
20230112125615_ProviderAddProviderTypeBillingPhone.Designer.cs [EC-427] Add provider types (MSP/Reseller) to Provider table (#2518) 2023-01-23 16:08:05 +00:00
20230113175436_Fix Navigation Properties.cs Remove Unused Auto Properties (#2580) 2023-01-13 14:24:58 -05:00
20230113175436_Fix Navigation Properties.Designer.cs Remove Unused Auto Properties (#2580) 2023-01-13 14:24:58 -05:00
20230118212950_RemoveDeviceUnknownVerification.cs [EC-400] Code clean up Device Verification (#2601) 2023-02-17 10:15:28 -03:00
20230118212950_RemoveDeviceUnknownVerification.Designer.cs [EC-400] Code clean up Device Verification (#2601) 2023-02-17 10:15:28 -03:00
20230120160257_OrganizationStatus.cs [AC-1081] Merge feature/billing-obfuscation (#2665) 2023-04-14 11:13:16 +01:00
20230120160257_OrganizationStatus.Designer.cs [AC-1081] Merge feature/billing-obfuscation (#2665) 2023-04-14 11:13:16 +01:00
20230124132220_KDFOptions.cs fix lint issues and sql csproj (#2627) 2023-01-25 12:44:32 -05:00
20230124132220_KDFOptions.Designer.cs [PS-2267] Add KdfMemory and KDFParallelism fields (#2583) 2023-01-25 07:56:54 -05:00
20230201175211_SecretsManagerOrganizationUser.cs Add EF migrations for SecretsManager flag (#2659) 2023-02-01 12:27:13 -06:00
20230201175211_SecretsManagerOrganizationUser.Designer.cs Add EF migrations for SecretsManager flag (#2659) 2023-02-01 12:27:13 -06:00
20230201192604_LastUserDates.cs add timestamps to user table for security related events (#2660) 2023-02-02 14:39:57 -05:00
20230201192604_LastUserDates.Designer.cs add timestamps to user table for security related events (#2660) 2023-02-02 14:39:57 -05:00
20230208210629_CipherKeyUpdate.cs Individual Vault Item Encryption Feature (#3256) 2023-09-28 08:45:13 -04:00
20230208210629_CipherKeyUpdate.Designer.cs Individual Vault Item Encryption Feature (#3256) 2023-09-28 08:45:13 -04:00
20230213133244_SecretsManagerEvent.cs [SM-389] Event log for service account (#2674) 2023-02-24 16:44:33 +01:00
20230213133244_SecretsManagerEvent.Designer.cs [SM-389] Event log for service account (#2674) 2023-02-24 16:44:33 +01:00
20230302121757_DomainClaiming.cs Add Sqlite Migration (#2760) 2023-03-02 08:50:27 -05:00
20230302121757_DomainClaiming.Designer.cs Add Sqlite Migration (#2760) 2023-03-02 08:50:27 -05:00
20230315121314_AuthRequestRemoveFingerprintPhrase.cs [PM-107] Remove fingerprint phase 2 (#2809) 2023-03-23 13:08:49 +00:00
20230315121314_AuthRequestRemoveFingerprintPhrase.Designer.cs [PM-107] Remove fingerprint phase 2 (#2809) 2023-03-23 13:08:49 +00:00
20230428130742_EFUpdate.cs Run ef_migrate.ps1 (#2892) 2023-05-01 09:32:06 -04:00
20230428130742_EFUpdate.Designer.cs Run ef_migrate.ps1 (#2892) 2023-05-01 09:32:06 -04:00
20230522030842_AddKeysToDevice.cs [PM-1380] Modify Device Table (#2937) 2023-06-09 21:36:12 -04:00
20230522030842_AddKeysToDevice.Designer.cs [PM-1380] Modify Device Table (#2937) 2023-06-09 21:36:12 -04:00
20230523223522_ClientSecretHash.cs [SM-678] ClientSecret migration (#2943) 2023-06-21 13:16:06 -05:00
20230523223522_ClientSecretHash.Designer.cs [SM-678] ClientSecret migration (#2943) 2023-06-21 13:16:06 -05:00
20230530114320_AddSecretsManagerBillingFieldToOrganization.cs [AC 1427]Add New Organisation Properties Update DB Objects and create migration (#2980) 2023-06-12 23:48:17 +01:00
20230530114320_AddSecretsManagerBillingFieldToOrganization.Designer.cs [AC 1427]Add New Organisation Properties Update DB Objects and create migration (#2980) 2023-06-12 23:48:17 +01:00
20230605182605_TdeAdminApproval.cs [AC-1192] Create endpoints for new Device Approvals page (#2993) 2023-06-15 14:54:08 -07:00
20230605182605_TdeAdminApproval.Designer.cs [AC-1192] Create endpoints for new Device Approvals page (#2993) 2023-06-15 14:54:08 -07:00
20230726191546_SecretsManagerBetaColumn.cs SM-802: Add SecretsManagerBeta Column Migration (#3065) 2023-07-26 15:55:28 -04:00
20230726191546_SecretsManagerBetaColumn.Designer.cs SM-802: Add SecretsManagerBeta Column Migration (#3065) 2023-07-26 15:55:28 -04:00
20230824202443_ACCESSPOLICY_ADD_DELETE_CASCADE.cs [SM-755] Add EF Secrets Manager cleanup on deletes (#3228) 2023-09-21 17:22:08 -05:00
20230824202443_ACCESSPOLICY_ADD_DELETE_CASCADE.Designer.cs [SM-755] Add EF Secrets Manager cleanup on deletes (#3228) 2023-09-21 17:22:08 -05:00
20231024181657_LimitCollectionCreateDelete.cs [AC-1373] Flexible Collections (#3245) 2023-11-01 09:30:52 +00:00
20231024181657_LimitCollectionCreateDelete.Designer.cs [AC-1373] Flexible Collections (#3245) 2023-11-01 09:30:52 +00:00
20231024200803_CollectionManagePermission.sql.cs [AC-1373] Flexible Collections (#3245) 2023-11-01 09:30:52 +00:00
20231024200803_CollectionManagePermission.sql.Designer.cs [AC-1373] Flexible Collections (#3245) 2023-11-01 09:30:52 +00:00
20231025225553_AdminCollectionItemAccess.cs [AC-1122] Add AllowAdminAccessToAllCollectionItems setting to Organizations (#3379) 2023-11-27 11:44:07 -08:00
20231025225553_AdminCollectionItemAccess.Designer.cs [AC-1122] Add AllowAdminAccessToAllCollectionItems setting to Organizations (#3379) 2023-11-27 11:44:07 -08:00
20231213032045_WebAuthnLoginCredentials.cs added webauthncredential ef migrations (#3555) 2023-12-13 07:03:42 -08:00
20231213032045_WebAuthnLoginCredentials.Designer.cs added webauthncredential ef migrations (#3555) 2023-12-13 07:03:42 -08:00
20231214162537_GrantIdWithIndexes.cs [PM-5519] [PM-5526] [PM-5624] [PM-5600] More Grant SQL fixes (#3668) 2024-01-16 09:08:55 -05:00
20231214162537_GrantIdWithIndexes.Designer.cs [PM-5294][deps]: Update Duende.IdentityServer to v6.3.7 (#3499) 2023-12-28 15:04:45 -05:00
20231229202304_AddToolsTableIndexes.cs [BEEEP] [SM-1060] Add missing tools table indexes to EF config (#3626) 2024-01-09 09:46:45 -06:00
20231229202304_AddToolsTableIndexes.Designer.cs [BEEEP] [SM-1060] Add missing tools table indexes to EF config (#3626) 2024-01-09 09:46:45 -06:00
20240104162642_AddCipherIdToSend.cs [PM-221] Adding CipherId to the Send table, create/update sprocs, and added mi… (#3646) 2024-03-04 19:31:33 -05:00
20240104162642_AddCipherIdToSend.Designer.cs [PM-221] Adding CipherId to the Send table, create/update sprocs, and added mi… (#3646) 2024-03-04 19:31:33 -05:00
20240109215333_AddTableIndexes.cs [BEEEP][SM-1062] Add missing table indexes to EF config (#3628) 2024-01-10 12:03:16 -06:00
20240109215333_AddTableIndexes.Designer.cs [BEEEP][SM-1062] Add missing table indexes to EF config (#3628) 2024-01-10 12:03:16 -06:00
20240111034245_OrganizationFlexibleCollectionsColumn.cs [AC-2025] Add Organization.FlexibleCollections to database and sprocs (#3642) 2024-01-11 13:25:57 +10:00
20240111034245_OrganizationFlexibleCollectionsColumn.Designer.cs [AC-2025] Add Organization.FlexibleCollections to database and sprocs (#3642) 2024-01-11 13:25:57 +10:00
20240112180610_AddAuthTableIndexes.cs [BEEEP] [SM-1059] Add missing auth table indexes to EF config (#3625) 2024-01-17 10:42:43 -06:00
20240112180610_AddAuthTableIndexes.Designer.cs [BEEEP] [SM-1059] Add missing auth table indexes to EF config (#3625) 2024-01-17 10:42:43 -06:00
20240131215352_RemoveSMBetaFromOrganization.cs SM-1012: Removing SM Beta (Phase 2) (#3663) 2024-02-05 15:51:31 -05:00
20240131215352_RemoveSMBetaFromOrganization.Designer.cs SM-1012: Removing SM Beta (Phase 2) (#3663) 2024-02-05 15:51:31 -05:00
20240216170322_AddSecretAccessPolicies.cs [SM-713] Add database support for secret access policies (#3681) 2024-02-22 10:06:39 -06:00
20240216170322_AddSecretAccessPolicies.Designer.cs [SM-713] Add database support for secret access policies (#3681) 2024-02-22 10:06:39 -06:00
20240308141731_SetupProviderBilling.cs [AC-1900] Update Vault DB to support provider billing (#3875) 2024-03-21 11:15:49 -04:00
20240308141731_SetupProviderBilling.Designer.cs [AC-1900] Update Vault DB to support provider billing (#3875) 2024-03-21 11:15:49 -04:00
20240425111436_EnableOrgsCollectionEnhancements.cs [AC-1978] Flexible collections: EF data migrations for deprecated permissions (#3969) 2024-04-26 14:11:29 +01:00
20240425111436_EnableOrgsCollectionEnhancements.Designer.cs [AC-1978] Flexible collections: EF data migrations for deprecated permissions (#3969) 2024-04-26 14:11:29 +01:00
20240507185438_UpdateProviderGatewayType.cs [PM-5216] User and Organization Duo Request and Response Model refactor (#4126) 2024-06-05 11:42:02 -07:00
20240507185438_UpdateProviderGatewayType.Designer.cs [PM-5216] User and Organization Duo Request and Response Model refactor (#4126) 2024-06-05 11:42:02 -07:00
20240606152401_ProviderInvoiceItem.cs [AC-1943] Add ProviderInvoiceItem table (#4163) 2024-06-06 13:25:13 -04:00
20240606152401_ProviderInvoiceItem.Designer.cs [AC-1943] Add ProviderInvoiceItem table (#4163) 2024-06-06 13:25:13 -04:00
20240701175209_Net8Sync.cs Sync EF migrations for .NET / EF Core 8 (#4448) 2024-07-02 10:08:34 -04:00
20240701175209_Net8Sync.Designer.cs Sync EF migrations for .NET / EF Core 8 (#4448) 2024-07-02 10:08:34 -04:00
20240702142228_DistributedCache.cs [PM-5518] Sql-backed IDistributedCache (#3791) 2024-07-03 12:48:23 -04:00
20240702142228_DistributedCache.Designer.cs [PM-5518] Sql-backed IDistributedCache (#3791) 2024-07-03 12:48:23 -04:00
20240703182714_AddClientIdToProviderInvoiceItem.cs [AC-2804] Add client ID to provider client invoice report (#4458) 2024-07-05 10:12:03 -04:00
20240703182714_AddClientIdToProviderInvoiceItem.Designer.cs [AC-2804] Add client ID to provider client invoice report (#4458) 2024-07-05 10:12:03 -04:00
20240703192739_UpdateNullConstraints.cs [PM-2944] Update Null DB Constraints (#4459) 2024-07-03 16:21:25 -04:00
20240703192739_UpdateNullConstraints.Designer.cs [PM-2944] Update Null DB Constraints (#4459) 2024-07-03 16:21:25 -04:00
20240703205857_UpdateNullConstraintsAdminConsole.cs PM-2944] Make Entities Nullable In Admin Console (#4386) 2024-07-04 21:14:37 -04:00
20240703205857_UpdateNullConstraintsAdminConsole.Designer.cs PM-2944] Make Entities Nullable In Admin Console (#4386) 2024-07-04 21:14:37 -04:00
20240723011520_DropOrganizationFlexibleCollections.cs [AC-2881] Remove Organization.FlexibleCollections from code (#4552) 2024-07-26 15:07:33 +10:00
20240723011520_DropOrganizationFlexibleCollections.Designer.cs [AC-2881] Remove Organization.FlexibleCollections from code (#4552) 2024-07-26 15:07:33 +10:00
20240724001634_MakeBlobNonNull.cs [PM-2943] Enable Nullable Repositories in Unowned Files (#4549) 2024-07-24 09:48:09 -04:00
20240724001634_MakeBlobNonNull.Designer.cs [PM-2943] Enable Nullable Repositories in Unowned Files (#4549) 2024-07-24 09:48:09 -04:00
20240811224838_GroupAccessAllDefaultValue.cs [PM-10361] Remove Group.AccessAll from code (#4614) 2024-08-13 08:54:03 +10:00
20240811224838_GroupAccessAllDefaultValue.Designer.cs [PM-10361] Remove Group.AccessAll from code (#4614) 2024-08-13 08:54:03 +10:00
20240826231356_OrganizationUserAccessAllDefaultValue.cs [AC-10362] Remove OrganizationUser.AccessAll from code (#4622) 2024-08-26 12:03:44 +01:00
20240826231356_OrganizationUserAccessAllDefaultValue.Designer.cs [AC-10362] Remove OrganizationUser.AccessAll from code (#4622) 2024-08-26 12:03:44 +01:00
20240828101418_FinalFlexibleCollectionsDataMigrations.cs [AC-1722] Deprecate "Edit/Delete Assigned Collections" custom permissions (#4604) 2024-09-02 11:04:55 +01:00
20240828101418_FinalFlexibleCollectionsDataMigrations.Designer.cs [AC-1722] Deprecate "Edit/Delete Assigned Collections" custom permissions (#4604) 2024-09-02 11:04:55 +01:00
20240902034910_DropGroupAccessAll.cs [PM-10368] Drop Group.AccessAll (#4700) 2024-09-02 15:01:32 +10:00
20240902034910_DropGroupAccessAll.Designer.cs [PM-10368] Drop Group.AccessAll (#4700) 2024-09-02 15:01:32 +10:00
DatabaseContextModelSnapshot.cs [PM-10368] Drop Group.AccessAll (#4700) 2024-09-02 15:01:32 +10:00