Skip to content

Conversation

groue
Copy link
Owner

@groue groue commented Oct 12, 2024

This PR addresses #1650.

When eraseDatabaseOnSchemaChange does not exactly fit your needs, you can implement it manually as below:

#if DEBUG
// Speed up development by nuking the database when migrations change
if dbQueue.read(migrator.hasSchemaChanges) {
    // Perform necessary logic, before and after content erasure
    try dbQueue.erase()
}
#endif
try migrator.migrate(dbQueue)

@groue groue merged commit 7cd075b into development Oct 12, 2024
8 checks passed
@groue groue deleted the dev/hasSchemaChanges branch October 12, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant