iamsauravsharma / sqlx_migrator

SQLX migration using Rust insted of SQL
MIT License
26 stars 2 forks source link

Error "Unknown column '$1' in 'field list'" when try to run migrator for mysql #12

Closed shandak closed 1 year ago

shandak commented 1 year ago

$1 or $2 do not support in mysql https://github.com/iamsauravsharma/sqlx_migrator/blob/master/src/migrator.rs#L676 instead should be used ?

iamsauravsharma commented 1 year ago

PR #13 fixes issue related to mysql. I will release new version after adding test to CI. You can use latest master version. Beware, latest master have changed trait name.

shandak commented 1 year ago

Is there a way to execute multiple queries per one migration? Looks like connection: &mut MySqlConnection is once borrowing per the first query and can't be used anymore...

iamsauravsharma commented 1 year ago

You can use .execute(&mut *connection) instead of .execute(connection)

shandak commented 1 year ago

You can use .execute(&mut *connection) instead of .execute(connection)

This is what I wanted, many thanks!!!

iamsauravsharma commented 1 year ago

version 0.6.0 released with all fixes earlier master branch had some issue