-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[BUG]: SQLite column name change error #5587
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Report hasn't been filed before.
- I have verified that the bug I'm about to report hasn't been filed before.
What version of drizzle-orm are you using?
0.45.2
What version of drizzle-kit are you using?
031.10
Other packages
No response
Describe the Bug
When I changed my column name "is_invisible" in my schema to "is_visible", the migration throws an error, since the SQL wants to insert back from the column "is_visible" which does not exist. This should be "is_invisible".
PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE __new_task (
...
is_visible integer DEFAULT true NOT NULL,
...
);
--> statement-breakpoint
INSERT INTO __new_task(..., "is_visible", ...) SELECT ..., "is_visible", ... FROM task;--> statement-breakpoint
DROP TABLE task;--> statement-breakpoint
ALTER TABLE __new_task RENAME TO task;--> statement-breakpoint
PRAGMA foreign_keys=ON;
Thanks for your work and kind regards.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working