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.
27 lines
727 B
27 lines
727 B
using System.Data;
|
|
using FluentMigrator;
|
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
|
|
|
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();
|
|
}
|
|
}
|
|
}
|
|
}
|