Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I do not know of a standard ASP.NET or SQL Server out-of-the box solution. </p> <p>One solution is to update the database object definitions outside of the ASP.NET framework. There are a few <a href="https://stackoverflow.com/questions/685053/what-is-best-tool-to-compare-two-sql-server-databases-schema-and-data">solid software options</a> that will compare the object definitions of your two databases and produce SQL code to bringer your older database in sync with your newer database.</p> <p>What will this software do? For Example, if you had this table:</p> <pre><code>Table1 (id int primary key, col_one int) </code></pre> <p>and you need to alter the table to look like this:</p> <pre><code>Table1 (id int primary key, col_one int, col_two nvarchar(50)) </code></pre> <p>then, the database compare software will either execute or print/display SQL code that looks like this:</p> <pre><code>Alter Table1 Add Column col_two </code></pre> <p>As always, be sure to create database backups before changing object definitions!</p> <p>Are you using code first? If so, (at least temporarily) disable the default database migrations. More can be found <a href="https://stackoverflow.com/a/14663178/772086">here</a> and <a href="http://msdn.microsoft.com/en-us/library/gg679461.aspx" rel="nofollow noreferrer">here</a>. This will prevent ASP.NET from dropping and re-creating your database if it finds any schema changes (I think it is better to receive an error than lose all of your data.)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload