K
Kysely•15mo 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
AdophilusOP•15mo ago
i added a console.log("beginning") to the top of the migration
No description
Adophilus
AdophilusOP•15mo ago
but it never gets called 🥲
Adophilus
AdophilusOP•15mo 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•15mo ago
Which dialect are you using? I mean the dialect class you provide to Kysely constructor?
Adophilus
AdophilusOP•15mo ago
I'm using the MysqlDialect From Kysely
Adophilus
AdophilusOP•15mo ago
No description
koskimas
koskimas•15mo ago
MySQL doesn't have transactional DDL so you might have partially applied migrations. But you should get some error
Adophilus
AdophilusOP•15mo 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
Want results from more Discord servers?
Add your server