Revert "- Fixed: attempt migrations fix from 0.5.10 to 0.6.0"

This reverts commit ae8e9a3506.
This commit is contained in:
mahee96
2025-03-23 11:57:16 -07:00
parent 117f31e158
commit cbde3e6495
9 changed files with 840 additions and 955 deletions

View File

@@ -11,7 +11,7 @@ import UIKit
public extension Source
{
static let altStoreIdentifier = "com.SideStore.SideStore"
static let altStoreIdentifier = try! Source.sourceID(from: Source.altStoreSourceURL)
#if STAGING
@@ -280,8 +280,6 @@ public class Source: BaseEntity, Decodable
case news
case featuredApps
case userInfo
case identifier
}
private override init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?)
@@ -306,9 +304,6 @@ public class Source: BaseEntity, Decodable
// use sourceversion = 1 by default if not specified in source json
self.version = try container.decodeIfPresent(Int.self, forKey: .version) ?? 1
// use sourceURL as identifier is one is not present for backwards compatibility
self.identifier = try container.decodeIfPresent(String.self, forKey: .identifier) ?? Source.sourceID(from: sourceURL)
self.subtitle = try container.decodeIfPresent(String.self, forKey: .subtitle)
self.websiteURL = try container.decodeIfPresent(URL.self, forKey: .websiteURL)
self.localizedDescription = try container.decodeIfPresent(String.self, forKey: .localizedDescription)
@@ -456,10 +451,9 @@ public extension Source
{
func setSourceURL(_ sourceURL: URL) throws
{
// commented out to retain source id as-is (independent of sourceURL)
// let identifier = try Source.sourceID(from: sourceURL)
// self.identifier = identifier
let identifier = try Source.sourceID(from: sourceURL)
self.identifier = identifier
self.sourceURL = sourceURL
for app in self.apps