You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
509 B
23 lines
509 B
using System.Data;
|
|
using System.Linq;
|
|
using ServiceStack.OrmLite;
|
|
|
|
namespace NzbDrone.Core.Datastore
|
|
{
|
|
public static class Migration
|
|
{
|
|
public static void CreateTables(IDbConnection dbConnection)
|
|
{
|
|
var types = typeof(ModelBase).Assembly.GetTypes();
|
|
|
|
var models = types.Where(c => c.BaseType == typeof(ModelBase));
|
|
|
|
foreach (var model in models)
|
|
{
|
|
dbConnection.CreateTable(true, model);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|