Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3969306
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:56:53+00:00 2026-05-20T03:56:53+00:00

When using the ORM NHibernate, what are the standard or best open source methods

  • 0

When using the ORM NHibernate, what are the standard or best open source methods for propogating changes to the schema to application users who have an existing version of the software?

If I need to add or remove properties from an existing class, how can I properly handle those changes for users who are using a previous version of the software?

I am looking for something that will run on Mono, if possible.

I would prefer not to have to analyze the resulting schema from ORM changes and hand code a version update every time I create a new build of the application.

(I am making the assumption that I will be using NHibernate to create the schema for the database, but if there are different methods which eliminate this issue then I am open to an answer).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:56:54+00:00Added an answer on May 20, 2026 at 3:56 am

    Like you use version control for source code you should use version control for database schema, especially when you are intended to provide update functionality for your application. There are some tools to help you, but I prefer do to things manually using XML file with SQL commands to update schema revision or downgrade, something like this:

     <Revision Id="3">
        <Up>
          <SqlCommand>CREATE TABLE [Category] ( [Id] BigInt Primary Key,    [Name] nvarchar(255) )</SqlCommand>
          <SqlCommand>ALTER TABLE [Group] ADD   CanRead bigint NULL</SqlCommand>
          <SqlCommand>UPDATE [SysValue] SET [Value] = '3' WHERE [Name] = 'Revision'</SqlCommand>
        </Up>
        <Down>
            <SqlCommand>DELETE TABLE [Category]</SqlCommand>
            <SqlCommand>ALTER TABLE [Group] DROP COLUMN [CanRead]</SqlCommand>
            <SqlCommand>UPDATE [SysValue] SET [Value] = '2' WHERE [Name] = 'Revision'</SqlCommand>
        </Down>
      </Revision>
    

    The good thing about it that if you write SQL commands right you can change schema without loosing data, you can write complex queries to copy data to temp table then dramatically alter this table and copy data back, convert data etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using NHibernate as my ORM solution and have a need for a
I'm starting a new application and looking at using an ORM -- in particular,
I'm using the SQLAlchemy Python ORM in a Pylons project. I have a class
I'm using Hibernate for ORM of my Java app to an Oracle database (not
Using an ORM approach in applications can often lead to the scenario where you
I'm using an ORM (SQLAlchemy, but my question is quite implementation-agnostic) to model a
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework
Using online interfaces to a version control system is a nice way to have
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using ASP.NET MVC there are situations (such as form submission) that may require a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.