1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-01-19 06:00:27 +00:00
Radarr/NzbDrone.Core/Datastore/Migration.cs
kay.one 7603d8e1ba auto increment ID.
model tables are automatically created.
2013-03-25 23:19:53 -07:00

22 lines
509 B
C#

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);
}
}
}
}