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

SQLite Migrations: Support more operations using PRAGMA writable_schema #7969

Closed
bricelam opened this issue Mar 23, 2017 · 2 comments
Closed
Assignees
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. punted-for-2.0 type-enhancement

Comments

@bricelam
Copy link
Contributor

PRAGMA writable_schema = 1; can be used for changes that don't affect the on-disk content:

  • AlterColumn (when defaultValue or defaultValueSql change or nullable changes to false)
  • DropForeignKey
  • RenameColumn

⚠️ Warning: Misuse corrupts the database.

This could be a cheaper alternative to implementing full table rebuilds.

@ajcvickers
Copy link
Contributor

It would be worth investing a day or so investigating whether we can safely get some cheap wins doing this.

@bricelam
Copy link
Contributor Author

I don't think we should do this. It would require parsing and updating the full CREATE TABLE statement. Rebuilding the table is easier from a Migrations perspective.

@bricelam bricelam removed this from the Backlog milestone Aug 11, 2017
@bricelam bricelam added the closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. label Aug 11, 2017
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. punted-for-2.0 type-enhancement
Projects
None yet
Development

No branches or pull requests

2 participants