migration migrainetion

pull/497/head
Devin Buhl 8 years ago
parent ddf10ed137
commit bfcd05206f

@ -1,18 +0,0 @@
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(125)]
public class create_netimport_table : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Create.TableForModel("NetImport")
.WithColumn("Enabled").AsBoolean()
.WithColumn("Name").AsString().Unique()
.WithColumn("Implementation").AsString()
.WithColumn("Settings").AsString().Nullable();
}
}
}

@ -0,0 +1,21 @@
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(123)]
public class create_netimport_table : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
if (!this.Schema.Schema("dbo").Table("NetImport").Exists())
{
Create.TableForModel("NetImport")
.WithColumn("Enabled").AsBoolean()
.WithColumn("Name").AsString().Unique()
.WithColumn("Implementation").AsString()
.WithColumn("Settings").AsString().Nullable();
}
}
}
}

@ -122,7 +122,7 @@
<Compile Include="Authentication\User.cs" />
<Compile Include="Authentication\UserRepository.cs" />
<Compile Include="Authentication\UserService.cs" />
<Compile Include="Datastore\Migration\119_create_netimport_table.cs" />
<Compile Include="Datastore\Migration\123_create_netimport_table.cs" />
<Compile Include="NetImport\CouchPotato\CouchPotatoAPI.cs" />
<Compile Include="NetImport\CouchPotato\CouchPotatoParser.cs" />
<Compile Include="NetImport\CouchPotato\CouchPotatoRequestGenerator.cs" />

Loading…
Cancel
Save