K
Kysely•9mo ago
Adophilus

Issue running migrations against MySQL database

Previously I had to make the switch from Postgres to MySQL because the database I had in production was MySQL. After making the switch, I noticed that my migrations started failing (understandably because of the slight difference in syntax between pg and mysql). I worked to fix those differences and then run the migrations but this time the migrations just hang there... for what seems like forever.
No description
8 Replies
Adophilus
Adophilus•9mo ago
i added a console.log("beginning") to the top of the migration
No description
Adophilus
Adophilus•9mo ago
but it never gets called 🥲
Adophilus
Adophilus•9mo ago
and I also added some console.logs to the migration function but the only ones that get called are the ones before the await migrator.migrateToLatest(); is called
No description
koskimas
koskimas•9mo ago
Which dialect are you using? I mean the dialect class you provide to Kysely constructor?
Adophilus
Adophilus•9mo ago
I'm using the MysqlDialect From Kysely
Adophilus
Adophilus•9mo ago
No description
koskimas
koskimas•9mo ago
MySQL doesn't have transactional DDL so you might have partially applied migrations. But you should get some error
Adophilus
Adophilus•9mo ago
Yeah, you mentioned it in a previous question (I checked) So I removed the db.transaction and just ran the migrations normally But even still, no errors or anything It just hangs there Oh wow You wouldn't believe it It's probably because I restarted my computer along the line. But it just started working