Base solution for your next web application
Open Closed

Is Database expandable and keep the Old data safe? #1513


User avatar
0
herschellersk created

If I use ASP.Net Boilerplate does it give flexibility to expand the modules as per need at later stage. For and example in database, I want to add StudentAge column in Student table and new ExamReport Table in current project running on ABP and data are loaded with Old data in those table. Can we upgrade the without affecting the Old data in database.


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

    Hi,

    We use EntityFramework Code First Migrations (or FluentMigrator for NHibernate). So, you can add new columns/tables to your dbcontext, add a migration and update the database. Your old data is not deleted. While this is not related to ABP, I want to say that: be careful on rename operations. If you rename ColumnA to ColumnB in an entity, migration generator will drop ColumnAand add a new ColumnB. You should manually change the migration code to rename it. Otherwise, old data in ColumnA has losted. Beside such special cases, there is no data loss normally. I suggest you to learn EF Migrations better.