Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How to change primary from the default int to long? #9497


User avatar
0
aria created

Hi, We are using aspnetzero version 8.6 asp.net core and angular, some entities are created by inherited from Entity class but we discovered that we should inherit from Entity<long> Now we want to change those classes and forigen keys and create the migration but we could not update-database because of db objects (indexs, keys and foriegn keys) depend on the columns columns old types. Can you please help us how to succeed this changes?

Thank you.


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi aria

    Maybe you can consider creating a new database table and importing the data from the old table.