Open Closed

GUID for data migration in Ms SQL Server #3058


User avatar
0
nikkariman created

Hi,

I'm currently developing a new application using ABP Commercial and MS SQL server database. The new application is based on a legacy application and needs to migrate all the data to the new application. My question is, during the data migration from an existing database, can I use the Guid column with newsequentialid() default value in table design?

  • ABP Framework version: v5.2.0
  • UI type: Angular
  • DB provider: EF Core, MS SQL Server
  • Tiered (MVC) or Identity Server Separated (Angular): yes - Identity Server
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    never use Guid.NewGuid() to create Ids for your entities!

    https://docs.abp.io/en/abp/latest/Guid-Generation

  • User Avatar
    0
    nikkariman created

    hi

    never use Guid.NewGuid() to create Ids for your entities!

    https://docs.abp.io/en/abp/latest/Guid-Generation

    I'm using SQL server script for the data migration. The only option on the database level is newId() or newsequentialid(). Is there any problem if I use newsequentialid() for existing data?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    We recommend that you use code(IGuidGenerator ) to migrate.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09