mirror of https://github.com/Radarr/Radarr
Fix for movies without an imdbid. Fixes 176
This commit is contained in:
parent
5e9a79afe8
commit
3276e3ec52
|
@ -0,0 +1,31 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using FluentMigrator;
|
||||||
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Datastore.Migration
|
||||||
|
{
|
||||||
|
[Migration(125)]
|
||||||
|
public class fix_imdb_unique : NzbDroneMigrationBase
|
||||||
|
{
|
||||||
|
protected override void MainDbUpgrade()
|
||||||
|
{
|
||||||
|
Execute.WithConnection(DeleteUniqueIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DeleteUniqueIndex(IDbConnection conn, IDbTransaction tran)
|
||||||
|
{
|
||||||
|
using (IDbCommand getSeriesCmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
getSeriesCmd.Transaction = tran;
|
||||||
|
getSeriesCmd.CommandText = @"DROP INDEX 'IX_Movies_ImdbId'";
|
||||||
|
|
||||||
|
getSeriesCmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -183,6 +183,7 @@
|
||||||
<Compile Include="Datastore\Migration\002_remove_tvrage_imdb_unique_constraint.cs" />
|
<Compile Include="Datastore\Migration\002_remove_tvrage_imdb_unique_constraint.cs" />
|
||||||
<Compile Include="Datastore\Migration\003_remove_clean_title_from_scene_mapping.cs" />
|
<Compile Include="Datastore\Migration\003_remove_clean_title_from_scene_mapping.cs" />
|
||||||
<Compile Include="Datastore\Migration\004_updated_history.cs" />
|
<Compile Include="Datastore\Migration\004_updated_history.cs" />
|
||||||
|
<Compile Include="Datastore\Migration\125_fix_imdb_unique.cs" />
|
||||||
<Compile Include="Datastore\Migration\124_add_preferred_tags_to_profile.cs" />
|
<Compile Include="Datastore\Migration\124_add_preferred_tags_to_profile.cs" />
|
||||||
<Compile Include="Datastore\Migration\122_add_movieid_to_blacklist.cs" />
|
<Compile Include="Datastore\Migration\122_add_movieid_to_blacklist.cs" />
|
||||||
<Compile Include="Datastore\Migration\121_update_filedate_config.cs" />
|
<Compile Include="Datastore\Migration\121_update_filedate_config.cs" />
|
||||||
|
|
Loading…
Reference in New Issue