ALTER COLUMN: REFERENCES
and FOREIGN KEY
#430
Unanswered
michaeldebetaz
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Yeah, ALTER TABLE ALTER COLUMN only works with simple key definitions, and the one generated by drizzle-kit is "complex", because it's moved to a separate foreign key definition. Our implementation does not yet support that. The only workaround would be to enable schema modifications with |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everybody 👋 I discovered
libSQL
throughdrizzle
andTurso
. As I am loving working with sqlite so far, I am putting in the work to understand how to be autonomous with my database and migration. I am not skilled enough to contribute to the codebase, but I hope my noobie questions could help improve the docs. By the way, I tried to enter the discord but the invitation link has expired. So I'll ask my question here:In the docs, I was confused with how to alter a column with a foreign key (in order to drop it). As I understand it, in Sqlite, you can add a
REFERENCES
constraint to a column, that's the way described in the docs:The equivalent and the result of the
drizzle-kit
generation is:I am however unable to drop the constraint with libSQL following the docs when the table is created the second way. Any help?
Thank you for your amazing tool 🔥
Beta Was this translation helpful? Give feedback.
All reactions