Radarr/src/NzbDrone.Core/Datastore/Migration/133_add_minimumavailability.cs

26 lines
865 B
C#
Raw Normal View History

using FluentMigrator;
2019-12-22 22:08:53 +00:00
2022-11-20 18:27:45 +00:00
// using FluentMigrator.Expressions;
Min availability (#816) * availability specification to prevent downloading titles before their release * pull inCinamas status out of js handlebars and set it in SkyHook * minor code improvement * add incinemas to footer * typo * another typo * release date handling * still print cinema date out for announced titles * revert a minor change from before since its unnecessary * early implementation of minimumAvailability --> when does radarr consider a movie "available" should be specified by user default to "Physical release?" this isn't functional yet, but it has a skeleton + comments. I dont know how to have the minimumavailability attribute default to something or to have it actually populate the Movieinfo object could use some help with that * adding another comment for another location that might need to be updated to handle minimumAvailability * the implementation is now function; however, i still need to specify default values for minimumAvailability * missed these changes in the previous commit * fix rounded corners on new field in editmovie dialog * add minimum availability specification to the addMovie page * minor adjustment from last commit * handle the case where minimumavailability has never yet been set nullstring.. if its never been set, default to Released (Physical/Web) represented by integer value 3 * minAvailability specification on NetImport lists * add support for min availability to the movie editor * use enum MovieStatusType values directly makes for cleaner code * need to fix up the migration forgot in last commit * cleaning up code, proper case * erroneous code added in this feature needed to be removed * update "Wanted" page to take into account minimumAvailability * implement preDB minimumAvailability as default.. behaves same as Physical/Web a few comments with TODO for when preDB is implemented * minor adjustment * remove some unused code (leave commented for now) * improve code for minimumavailability and add option for availabilitydelay (but doesnt do anything yet) * improve isAvailable method * clean up and fix helper info on indexer configuration page * add buttons in Wanted/Missing view
2017-02-23 05:03:48 +00:00
using NzbDrone.Core.Datastore.Migration.Framework;
using NzbDrone.Core.Movies;
Min availability (#816) * availability specification to prevent downloading titles before their release * pull inCinamas status out of js handlebars and set it in SkyHook * minor code improvement * add incinemas to footer * typo * another typo * release date handling * still print cinema date out for announced titles * revert a minor change from before since its unnecessary * early implementation of minimumAvailability --> when does radarr consider a movie "available" should be specified by user default to "Physical release?" this isn't functional yet, but it has a skeleton + comments. I dont know how to have the minimumavailability attribute default to something or to have it actually populate the Movieinfo object could use some help with that * adding another comment for another location that might need to be updated to handle minimumAvailability * the implementation is now function; however, i still need to specify default values for minimumAvailability * missed these changes in the previous commit * fix rounded corners on new field in editmovie dialog * add minimum availability specification to the addMovie page * minor adjustment from last commit * handle the case where minimumavailability has never yet been set nullstring.. if its never been set, default to Released (Physical/Web) represented by integer value 3 * minAvailability specification on NetImport lists * add support for min availability to the movie editor * use enum MovieStatusType values directly makes for cleaner code * need to fix up the migration forgot in last commit * cleaning up code, proper case * erroneous code added in this feature needed to be removed * update "Wanted" page to take into account minimumAvailability * implement preDB minimumAvailability as default.. behaves same as Physical/Web a few comments with TODO for when preDB is implemented * minor adjustment * remove some unused code (leave commented for now) * improve code for minimumavailability and add option for availabilitydelay (but doesnt do anything yet) * improve isAvailable method * clean up and fix helper info on indexer configuration page * add buttons in Wanted/Missing view
2017-02-23 05:03:48 +00:00
namespace NzbDrone.Core.Datastore.Migration
{
[Migration(133)]
public class add_minimumavailability : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
2019-12-22 22:08:53 +00:00
if (!Schema.Schema("dbo").Table("NetImport").Column("MinimumAvailability").Exists())
Min availability (#816) * availability specification to prevent downloading titles before their release * pull inCinamas status out of js handlebars and set it in SkyHook * minor code improvement * add incinemas to footer * typo * another typo * release date handling * still print cinema date out for announced titles * revert a minor change from before since its unnecessary * early implementation of minimumAvailability --> when does radarr consider a movie "available" should be specified by user default to "Physical release?" this isn't functional yet, but it has a skeleton + comments. I dont know how to have the minimumavailability attribute default to something or to have it actually populate the Movieinfo object could use some help with that * adding another comment for another location that might need to be updated to handle minimumAvailability * the implementation is now function; however, i still need to specify default values for minimumAvailability * missed these changes in the previous commit * fix rounded corners on new field in editmovie dialog * add minimum availability specification to the addMovie page * minor adjustment from last commit * handle the case where minimumavailability has never yet been set nullstring.. if its never been set, default to Released (Physical/Web) represented by integer value 3 * minAvailability specification on NetImport lists * add support for min availability to the movie editor * use enum MovieStatusType values directly makes for cleaner code * need to fix up the migration forgot in last commit * cleaning up code, proper case * erroneous code added in this feature needed to be removed * update "Wanted" page to take into account minimumAvailability * implement preDB minimumAvailability as default.. behaves same as Physical/Web a few comments with TODO for when preDB is implemented * minor adjustment * remove some unused code (leave commented for now) * improve code for minimumavailability and add option for availabilitydelay (but doesnt do anything yet) * improve isAvailable method * clean up and fix helper info on indexer configuration page * add buttons in Wanted/Missing view
2017-02-23 05:03:48 +00:00
{
Alter.Table("NetImport").AddColumn("MinimumAvailability").AsInt32().WithDefaultValue((int)MovieStatusType.Released);
Min availability (#816) * availability specification to prevent downloading titles before their release * pull inCinamas status out of js handlebars and set it in SkyHook * minor code improvement * add incinemas to footer * typo * another typo * release date handling * still print cinema date out for announced titles * revert a minor change from before since its unnecessary * early implementation of minimumAvailability --> when does radarr consider a movie "available" should be specified by user default to "Physical release?" this isn't functional yet, but it has a skeleton + comments. I dont know how to have the minimumavailability attribute default to something or to have it actually populate the Movieinfo object could use some help with that * adding another comment for another location that might need to be updated to handle minimumAvailability * the implementation is now function; however, i still need to specify default values for minimumAvailability * missed these changes in the previous commit * fix rounded corners on new field in editmovie dialog * add minimum availability specification to the addMovie page * minor adjustment from last commit * handle the case where minimumavailability has never yet been set nullstring.. if its never been set, default to Released (Physical/Web) represented by integer value 3 * minAvailability specification on NetImport lists * add support for min availability to the movie editor * use enum MovieStatusType values directly makes for cleaner code * need to fix up the migration forgot in last commit * cleaning up code, proper case * erroneous code added in this feature needed to be removed * update "Wanted" page to take into account minimumAvailability * implement preDB minimumAvailability as default.. behaves same as Physical/Web a few comments with TODO for when preDB is implemented * minor adjustment * remove some unused code (leave commented for now) * improve code for minimumavailability and add option for availabilitydelay (but doesnt do anything yet) * improve isAvailable method * clean up and fix helper info on indexer configuration page * add buttons in Wanted/Missing view
2017-02-23 05:03:48 +00:00
}
2019-12-22 22:08:53 +00:00
if (!Schema.Schema("dbo").Table("Movies").Column("MinimumAvailability").Exists())
2019-12-22 21:24:10 +00:00
{
Alter.Table("Movies").AddColumn("MinimumAvailability").AsInt32().WithDefaultValue((int)MovieStatusType.Released);
2019-12-22 21:24:10 +00:00
}
Min availability (#816) * availability specification to prevent downloading titles before their release * pull inCinamas status out of js handlebars and set it in SkyHook * minor code improvement * add incinemas to footer * typo * another typo * release date handling * still print cinema date out for announced titles * revert a minor change from before since its unnecessary * early implementation of minimumAvailability --> when does radarr consider a movie "available" should be specified by user default to "Physical release?" this isn't functional yet, but it has a skeleton + comments. I dont know how to have the minimumavailability attribute default to something or to have it actually populate the Movieinfo object could use some help with that * adding another comment for another location that might need to be updated to handle minimumAvailability * the implementation is now function; however, i still need to specify default values for minimumAvailability * missed these changes in the previous commit * fix rounded corners on new field in editmovie dialog * add minimum availability specification to the addMovie page * minor adjustment from last commit * handle the case where minimumavailability has never yet been set nullstring.. if its never been set, default to Released (Physical/Web) represented by integer value 3 * minAvailability specification on NetImport lists * add support for min availability to the movie editor * use enum MovieStatusType values directly makes for cleaner code * need to fix up the migration forgot in last commit * cleaning up code, proper case * erroneous code added in this feature needed to be removed * update "Wanted" page to take into account minimumAvailability * implement preDB minimumAvailability as default.. behaves same as Physical/Web a few comments with TODO for when preDB is implemented * minor adjustment * remove some unused code (leave commented for now) * improve code for minimumavailability and add option for availabilitydelay (but doesnt do anything yet) * improve isAvailable method * clean up and fix helper info on indexer configuration page * add buttons in Wanted/Missing view
2017-02-23 05:03:48 +00:00
}
}
}