Skip to content

Conversation

@jayvdb
Copy link
Collaborator

@jayvdb jayvdb commented Nov 2, 2025

Fixes one of #226

let stmts: [&str; 4] = [
// Wrap in PRAGMA defer_foreign_keys to allow dropping tables that are referenced
let stmts: [&str; 6] = [
"PRAGMA defer_foreign_keys = ON;",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I like this, but it does solve one of our rollback problems.

@jayvdb jayvdb force-pushed the sqlite-disable-pragmas-during-migration branch from 8f42c37 to ffeef6e Compare November 2, 2025 06:28
@jayvdb jayvdb marked this pull request as ready for review November 2, 2025 11:47
@jayvdb jayvdb requested a review from Electron100 November 2, 2025 11:47
@jayvdb jayvdb force-pushed the sqlite-disable-pragmas-during-migration branch from ffeef6e to 0e8162e Compare November 8, 2025 12:45
Comment on lines 592 to +595
//future improvement: support column renames
/// Disable constraint enforcement before migration operations.
/// Used when operations require temporarily disabling foreign key checks or other constraints.
DisableConstraints,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I'm still not sure about this.
Perhaps rename to Preamble and Postamble/Epilogue , to be a bit more generic.

To be truely useful for allowing workarounds for complex situations, I feel that these new Ops should have arguments of old and new ADB, so that the backend has the full context and can then provide complex logic. But that feels like cheating.

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

Successfully merging this pull request may close these issues.

2 participants