Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch dev with rel-5.0 #10256

Merged
merged 3 commits into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 11 additions & 6 deletions docs/en/Migration-Guides/Abp-5_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

## IdentityUser

We added an `IsActive(bool)` property to `IdentityUser` to [control whether it is available](https://github.com/abpframework/abp/pull/10185). **Please set it to `true` of the old user after the upgrade.**
`IsActive <bool>` property is added to the `IdentityUser`. This flag will be checked during the authentication of the users. See the related [PR](https://github.com/abpframework/abp/pull/10185).
**After the migration, set this property to `true` for the existing users: `UPDATE AbpUsers SET IsActive=1`**

For EFCore you can change `defaultValue` to `true` in the migration class:
(This will add the column with `true` value for the existing records.)

For EF Core you can change `defaultValue` to `true` in the migration class:
```cs
public partial class AddIsActiveToIdentityUser : Migration
{
Expand All @@ -27,16 +30,18 @@ public partial class AddIsActiveToIdentityUser : Migration
}
```


For document base databases like MongoDB, you need to manually update the `IsActive` field for the existing user records.

## MongoDB

ABP Framework will serialize the datetime based on [AbpClockOptions](https://docs.abp.io/en/abp/latest/Timing#clock-options) start from 5.0, before `DateTime` values in MongoDB are [always saved as UTC](https://mongodb.github.io/mongo-csharp-driver/2.13/reference/bson/mapping/#datetime-serialization-options).
ABP Framework will serialize the datetime based on [AbpClockOptions](https://docs.abp.io/en/abp/latest/Timing#clock-options) starting from ABP v5.0. It was saving `DateTime` values as UTC in MongoDB. Check out [MongoDB Datetime Serialization Options](https://mongodb.github.io/mongo-csharp-driver/2.13/reference/bson/mapping/#datetime-serialization-options).

You can disable this behavior with `AbpMongoDbOptions`:

You can disable this behavior by configure `AbpMongoDbOptions`.
```cs
services.Configure<AbpMongoDbOptions>(x => x.UseAbpClockHandleDateTime = false);
```

## Angular UI

See the [Angular UI Migration Guide](Abp-5_0-Angular.md).
See the [Angular UI 5.0 Migration Guide](Abp-5_0-Angular.md).