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:"
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

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

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • 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?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

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

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.