Commit graph

43 commits

Author SHA1 Message Date
Joe Rogers
0f4da9f635
Fix crash on missing server config file 2021-12-14 19:29:31 +01:00
Stoica Tedy
4e03801931
Update Jellyfin.Server/Migrations/MigrationRunner.cs
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2021-12-14 09:57:20 +02:00
Stoica Tedy
250332104b
Fixed crash in MigrationRunner
The crashed was caused by importing the migrationOptions even if the
migrations.xml file is non existant.
[Issue]: ~/.config/jellyfin/migrations.xml not found #6992
2021-12-14 09:31:35 +02:00
Claus Vium
a87b87825d
Update Jellyfin.Server/Migrations/MigrationRunner.cs
Co-authored-by: Cody Robibero <cody@robibe.ro>
2021-11-27 16:01:27 +01:00
cvium
69df004b9f Migrate network configuration safely 2021-11-24 13:00:12 +01:00
Patrick Barron
45f478f63e Merge branch 'master' into authenticationdb-efcore
# Conflicts:
#	Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
#	MediaBrowser.Controller/Library/IUserManager.cs
#	MediaBrowser.Controller/Security/IAuthenticationRepository.cs
#	MediaBrowser.Controller/Session/ISessionManager.cs
2021-08-13 21:08:24 -04:00
Bond_009
f1f72c3060 Minor improvements 2021-08-04 14:40:09 +02:00
Patrick Barron
3264575047 Add data migration 2021-06-18 17:07:30 -04:00
Bond_009
a4ffc7a813 Fix random failing of tests
Fully initialize the configuration manager at the init stage

```
Failed Jellyfin.Server.Integration.Tests.Controllers.ActivityLogControllerTests.ActivityLog_GetEntries_Ok [2 s]
  Error Message:
   MediaBrowser.Common.Extensions.ResourceNotFoundException : Configuration with key metadata not found.
  Stack Trace:
     at Emby.Server.Implementations.AppBase.BaseConfigurationManager.<>c__DisplayClass43_0.<GetConfiguration>b__0(String k) in D:\a\1\s\Emby.Server.Implementations\AppBase\BaseConfigurationManager.cs:line 309
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Emby.Server.Implementations.AppBase.BaseConfigurationManager.GetConfiguration(String key) in D:\a\1\s\Emby.Server.Implementations\AppBase\BaseConfigurationManager.cs:line 300
   at MediaBrowser.Common.Configuration.ConfigurationManagerExtensions.GetConfiguration[T](IConfigurationManager manager, String key) in D:\a\1\s\MediaBrowser.Common\Configuration\IConfigurationManager.cs:line 88
   at MediaBrowser.Controller.Library.MetadataConfigurationExtensions.GetMetadataConfiguration(IConfigurationManager config) in D:\a\1\s\MediaBrowser.Controller\Library\MetadataConfigurationStore.cs:line 28
   at Emby.Server.Implementations.Library.ResolverHelper.SetDateCreated(BaseItem item, IFileSystem fileSystem, FileSystemMetadata info) in D:\a\1\s\Emby.Server.Implementations\Library\ResolverHelper.cs:line 159
   at Emby.Server.Implementations.Library.ResolverHelper.EnsureDates(IFileSystem fileSystem, BaseItem item, ItemResolveArgs args) in D:\a\1\s\Emby.Server.Implementations\Library\ResolverHelper.cs:line 153
   at Emby.Server.Implementations.Library.ResolverHelper.SetInitialItemValues(BaseItem item, ItemResolveArgs args, IFileSystem fileSystem, ILibraryManager libraryManager) in D:\a\1\s\Emby.Server.Implementations\Library\ResolverHelper.cs:line 81
   at Emby.Server.Implementations.Library.LibraryManager.ResolveItem(ItemResolveArgs args, IItemResolver[] resolvers) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 480
   at Emby.Server.Implementations.Library.LibraryManager.ResolvePath(FileSystemMetadata fileInfo, IDirectoryService directoryService, IItemResolver[] resolvers, Folder parent, String collectionType, LibraryOptions libraryOptions) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 618
   at Emby.Server.Implementations.Library.LibraryManager.ResolvePath(FileSystemMetadata fileInfo, Folder parent) in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 536
   at Emby.Server.Implementations.Library.LibraryManager.CreateRootFolder() in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 732
   at Emby.Server.Implementations.Library.LibraryManager.get_RootFolder() in D:\a\1\s\Emby.Server.Implementations\Library\LibraryManager.cs:line 180
   at Emby.Server.Implementations.IO.LibraryMonitor.Start() in D:\a\1\s\Emby.Server.Implementations\IO\LibraryMonitor.cs:line 135
   at Emby.Server.Implementations.IO.LibraryMonitorStartup.RunAsync() in D:\a\1\s\Emby.Server.Implementations\IO\LibraryMonitorStartup.cs:line 26
   at Emby.Server.Implementations.ApplicationHost.StartEntryPoints(IEnumerable`1 entryPoints, Boolean isBeforeStartup)+MoveNext() in D:\a\1\s\Emby.Server.Implementations\ApplicationHost.cs:line 541
   at System.Threading.Tasks.Task.WhenAll(IEnumerable`1 tasks)
   at Emby.Server.Implementations.ApplicationHost.RunStartupTasksAsync(CancellationToken cancellationToken) in D:\a\1\s\Emby.Server.Implementations\ApplicationHost.cs:line 525
   at Jellyfin.Server.Integration.Tests.JellyfinApplicationFactory.CreateServer(IWebHostBuilder builder) in D:\a\1\s\tests\Jellyfin.Server.Integration.Tests\JellyfinApplicationFactory.cs:line 101
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.EnsureServer()
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateDefaultClient(DelegatingHandler[] handlers)
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateDefaultClient(Uri baseAddress, DelegatingHandler[] handlers)
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateClient(WebApplicationFactoryClientOptions options)
   at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.CreateClient()
   at Jellyfin.Server.Integration.Tests.Controllers.ActivityLogControllerTests.ActivityLog_GetEntries_Ok() in D:\a\1\s\tests\Jellyfin.Server.Integration.Tests\Controllers\ActivityLogControllerTests.cs:line 21
--- End of stack trace from previous location ---

```
2021-04-12 00:28:17 +02:00
crobibero
60b7e49a7f Suggestions from code review 2020-12-04 08:00:55 -07:00
Fernando Fernández
d6a04fd406 Remove setting from existing libraries with a migration 2020-11-10 02:12:50 +01:00
Patrick Barron
3d69cea1c9
Merge branch 'master' into displaypreferences-efcore 2020-07-23 23:50:12 +00:00
crobibero
6c076b2162 Try adding plugin repository again 2020-07-21 08:27:12 -06:00
crobibero
9343e73b26 Allow migration to optionally run on fresh install 2020-07-20 07:45:24 -06:00
Patrick Barron
ab396225ea Migrate Display Preferences to EF Core 2020-07-17 16:11:53 -04:00
dkanada
e77f6194f2
add missing comma in array 2020-06-17 02:16:17 +09:00
dkanada
f5d82441a4
Merge branch 'master' into custom-repos 2020-06-17 02:09:32 +09:00
crobibero
340624c54b Move default repo addition to migration 2020-06-05 13:23:38 -06:00
Patrick Barron
aca7e221d8 Merge branch 'master' into userdb-efcore
# Conflicts:
#	Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs
#	Emby.Server.Implementations/ApplicationHost.cs
#	Emby.Server.Implementations/Devices/DeviceManager.cs
#	Jellyfin.Server/Jellyfin.Server.csproj
#	Jellyfin.Server/Migrations/MigrationRunner.cs
#	MediaBrowser.Controller/Devices/IDeviceManager.cs
2020-05-15 17:20:07 -04:00
Mark Monteiro
757643e326 Merge remote-tracking branch 'upstream/master' into no-more-doppelgangers 2020-05-15 15:23:44 -04:00
Vasily
43dc604e87 Fixed compilation, added backing db before removing extras 2020-05-15 21:49:45 +03:00
Vasily
7c57134535 Implement a cleanup migration 2020-05-15 02:30:28 +03:00
Patrick Barron
b7621d762c 2nd half of changes 2020-05-13 00:00:57 -04:00
Patrick Barron
bac4bf96a0 Fix build errors 2020-05-12 12:50:17 -04:00
Patrick Barron
6379391f87
Merge branch 'master' into activitydb-efcore 2020-05-12 16:08:28 +00:00
Patrick Barron
032de931b1 Migrate activity db to EF Core 2020-05-02 18:32:22 -04:00
Mark Monteiro
1666f3ca14 Use dependency injection to construct migration routines 2020-04-16 23:40:32 -04:00
Mark Monteiro
9e89cbbc3a Store migration names alongside Ids in configuration in order to assist with development/debugging 2020-03-08 17:40:30 +01:00
Mark Monteiro
72bf920291 Use a Guid to uniquely identify migrations instead of a string name
Also use a list instead of an array to store executed migrations in the configuration class
2020-03-08 16:05:31 +01:00
Mark Monteiro
2f0b4cc24c Clean up migration logging messages 2020-03-08 15:02:59 +01:00
Mark Monteiro
a0fdceb4bc Throw exception on migration failure to halt application
Also save migration configuration after each migration instead of at the end in case an exception is thrown part way through the list
2020-03-08 15:02:42 +01:00
Joshua M. Boniface
ae9948ce04
Merge branch 'master' into logging-migration 2020-03-07 21:19:24 -05:00
Mark Monteiro
1295f6c79b Documentation and log message cleanup 2020-03-07 20:26:06 +01:00
Mark Monteiro
7ecb16a46e
do not ignore exceptions during migration execution 2020-03-07 18:23:32 +01:00
Mark Monteiro
4c2b543b30 Rename IUpdater to IMigrationRoutine 2020-03-06 21:51:50 +01:00
Mark Monteiro
1a9908d094 Add migration to create "logging.user.json" 2020-03-06 19:11:42 +01:00
Vasily
5a0f1fe848 Implement review suggestion 2020-03-06 19:01:07 +03:00
Vasily
098d3538e3 Disable logging.json migration as it is not ready yet 2020-03-06 17:22:22 +03:00
Vasily
d4564d8e29 More logging, mark all migrations as applied if setup wizard is not complete 2020-03-06 13:22:44 +03:00
Vasily
55b429e5e8 Moved migration routines to their own directory 2020-03-05 20:40:17 +03:00
Vasily
ccafebca68 Extract "migrations" config name to a proper constant 2020-03-05 20:37:49 +03:00
Vasily
ecaa7f8014 Improve migration logic 2020-03-05 20:09:33 +03:00
Vasily
66e11879ef Shuffle migrations in a more manageable structure 2020-03-05 18:21:27 +03:00