Not creative but create tmp table, insert into tmp...
# squarelibraries
b
Not creative but create tmp table, insert into tmp from selection * from current, drop current, rename tmp to current
☝️ 1
s
I’m not super confident that sqldelight would be able to follow that
b
We do that all the time with SqlDelight in Cash App
all the time
It’s just a sequence of queries in one migration
s
That sounds like a gh-ost migration flow
I’ll think about it, thanks
j
It was the recommended way to do anything like a table rename or type change in sqlite for like a decade. The rename column alter table was added to sqlite like last year
s
Ah - I’m using it in mysql for a server
seems odd to rely on that when the table is potentially millions of rows
j
is that a lot? i have a hard time understanding at what ordinal migrations become Very Slow™
i'm not sure i'd expect a million to be that slow but many millions seems like it would be
e
I've had serious performance issues with MySQL migrations in the past. Like we could only run migrations at 3am slow
s
I don’t know. I’m an Android dev. I haven’t had experience on server databases, and thus server migrations in a decade.
I think my goal is going to be to work around some of the shortcomings I’ve found for now, and then submit some PRs to get some of the more interesting features for mysql added to sqldelight later on.