-
-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the issue
SQLite driver should support dropping columns in ALTER TABLE statements
Vapor version
4.97.0
Operating system and version
macOS Sonoma 14.4.1
Swift version
Swift Package Manager - Swift 5.10.0-dev
Steps to reproduce
let database: Database // = req.db
try await database.schema(Tree.schema)
.deleteField("created_at")
.update()Outcome
This code will currently fail with SQLite Database with this error:
[ WARNING ] SQLite only supports adding columns in ALTER TABLE statements.
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: SQLite only supports adding columns in ALTER TABLE statements.
Additional notes
The error is thrown, because it falls into this guard statement:
https://github.com/vapor/fluent-sqlite-driver/blame/be7051a9cfcd4e3aeb10d7303cb2634d034350b8/Sources/FluentSQLiteDriver/FluentSQLiteDatabase.swift#L52
Support for dropping columns was added in SQLite 3.35.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working