Files
messengerapi/code/MessengerApi.Db.Sql.Migrator/Program.cs
T

16 lines
841 B
C#

namespace MessengerApi.Db.Sql.Migrator
{
internal class Program
{
static void Main(string[] args)
{
// You can use empty string to build the context when adding a migration - adding a migration does not hit the DB.
// DesignTimeDbFactory.ConnectionString.cs is not versioned on purposed. Add missing property file for this partial class and then run this command:
// Add-Migration YourMigration -Project MessengerApi.Db.Sql -StartupProject MessengerApi.Db.Sql.Migrator -Verbose -Context MessengerSqlDbContext
// To update the database, make sure your connection string is correct and run this command:
// Update-Database -Project MessengerApi.Db.Sql -StartupProject MessengerApi.Db.Sql.Migrator -Verbose -Context MessengerSqlDbContext
}
}
}