Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider flipping data and decoder in migrations #177

Open
dimitribouniol opened this issue Mar 29, 2024 · 0 comments
Open

Consider flipping data and decoder in migrations #177

dimitribouniol opened this issue Mar 29, 2024 · 0 comments

Comments

@dimitribouniol
Copy link
Member

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) }
            ]
        )
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant