Skip to content

Consider flipping data and decoder in migrations #177

@dimitribouniol

Description

@dimitribouniol

Currently, when defining migrations using the shorthand $0/1 syntax, the data and decoder is used in the opposite order:

    static func datastore(for persistence: DiskPersistence<ReadWrite>) -> Datastore {
        .JSONStore(
            persistence: persistence,
            key: datastoreKey,
            version: .zero,
            migrations: [
                .zero: { try $1.decode(KeyValue.self, from: $0) }
            ]
        )
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions