Open Closed

POST deployment Script or DB migration execute both Schema and data #2340


User avatar
0
Naren created

I need to run the insert script with lakhs of data after deployment am not able to do manually because prod server we have no access so need to execute the script programatically its possible in ABP ? or for DB migration execute with both schema and data for particular table alone ?

Note : I have 1.5 lakhs of data in single table.

  • ABP Framework version: 4.4.4
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • 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)

5 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    Hi,

    ABP provides data seed system: https://docs.abp.io/en/abp/latest/Data-Seeding

    Is it suitable for you?

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

    Hi,

    ABP provides data seed system: https://docs.abp.io/en/abp/latest/Data-Seeding

    Is it suitable for you?

    No, its not suitable for this

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

    Hi,

    You want to execute SQL script right?

    Can you check this: https://dejanstojanovic.net/aspnet/2020/september/seeding-data-in-ef-core-using-sql-scripts/

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

    any other way during deployment i need run the the script becuase i have lakhs of data

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

    Hi,

    Sorry, I don't know what's blocking you.

    execute the script programatically its possible in ABP ?

    This is possible, you can make SQL script as embedded files and execute the SQL script during program runtime

    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 October 05, 2026, 11:32
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.