You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys, I have currently migrated over from kysely to drizzle (which was a blast, actually). The biggest "problem" was changing all the queries over to drizzle, but since there was a query library in my project it was not such a big deal as I thought.
Nevertheless, I migrated a Planetscale Database over, and since MySQL (and also Planetscale) has no first class citizenship for booleans it is using tinyint's.
The problem lays in the definition of the tinyint's in the schema. With kysely, a Boolean is defined as tinyint(1). With drizzle, the boolean is defined as tinyint (no (1)).
Since I have a lot of tables in my DB which are using a boolean, I have got over the limit of 10 table changes in Planetscale (didn't know, that there is even such a limit, docs also not specifying, but it says so to me in the PS dashboard).
Now, the problem is pretty much there on big projects, but it still would be nice to set the length manually, as you can in varchar's, so that the size of the migrations/deploy requests would be limited in the dashboard of Planetscale.
Edit: I just read again & was indeed confused myself. tinyint() has a configuration pattern, but when using the boolean() constructor, it does not. And this is making the migration hard to complete.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey guys, I have currently migrated over from kysely to drizzle (which was a blast, actually). The biggest "problem" was changing all the queries over to drizzle, but since there was a query library in my project it was not such a big deal as I thought.
Nevertheless, I migrated a Planetscale Database over, and since MySQL (and also Planetscale) has no first class citizenship for booleans it is using tinyint's.
The problem lays in the definition of the tinyint's in the schema. With kysely, a Boolean is defined as
tinyint(1)
. With drizzle, the boolean is defined astinyint
(no(1)
).Since I have a lot of tables in my DB which are using a boolean, I have got over the limit of 10 table changes in Planetscale (didn't know, that there is even such a limit, docs also not specifying, but it says so to me in the PS dashboard).
Now, the problem is pretty much there on big projects, but it still would be nice to set the length manually, as you can in varchar's, so that the size of the migrations/deploy requests would be limited in the dashboard of Planetscale.
Edit: I just read again & was indeed confused myself.
tinyint()
has a configuration pattern, but when using theboolean()
constructor, it does not. And this is making the migration hard to complete.Beta Was this translation helpful? Give feedback.
All reactions