Skip to content

ASP.NET Idenityt 2 to ASP.NET Identity 3 migration script

Notifications You must be signed in to change notification settings

Eirenarch/Identity2to3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Identity2to3

SQL Script to migrate database schema from ASP.NET Identity 2 to ASP.NET Identity 3. This script was generated by the Visual Studio Schema Compare tool and then modified by hand. The goal of the script is to migrate the schema without dropping the AspNetUsers table. The other tables are dropped and recreated in the process and data is copied. If you have modifications to tables other than the users table or if you have modified the PK of the users table you should modify the script accordingly. There are several changes compared to the default schema related to PK sizes.

  • The users table has a PK of NVARCHAR(128) as it has in Identity 2 rather than NVARCHAR(450) what Identity 3 uses. All relationship in other tables are also changed to NVARCHAR(128)

  • The roles table has a PK of NVARCHAR(128). There were several warnings related to maximum key size exceeding 900 bytes for keys including the role id.

  • There are still some warning related to Login provider having longer keys but I think it is reasonable risk to let the ProviderKey be 450 characters as the actual external provider may use large keys. Note that the default ASP.NET Identity 3 schema has even larger primary keys.

About

ASP.NET Idenityt 2 to ASP.NET Identity 3 migration script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published