hi, I was trying to create a migration where I cha...
# orm-help
s
hi, I was trying to create a migration where I changed the type of id from String to BigInt but I'm getting this error
Error: P3006
Migration
20220815103305_product_and_order_incremental_id
failed to apply cleanly to the shadow database. Error: db error: ERROR: value type string doesn't match type int of column "id" HINT: you will need to rewrite or cast the expression 0: sql_migration_connector::validate_migrations at migration-engine/connectors/sql-migration-connector/src/lib.rs:270 1: migration_core:state:DevDiagnostic at migration-engine/core/src/state.rs:250 can anyone help me about what I should do?
👀 1
r
Hi @Shamim Fahad 👋 Were you able to fix this issue?
s
No, not actually
r
Thanks for getting back to me. I'll try to reproduce this scenario and see if i can come up with a fix.
s
okay, thank you 🙂
I deleted my previous migrations for a workaround this problem since I was stuck with it
r
Ah i see. I can actually see why there could be issues. The change in datatype from String to BigInt is actually a factor especially if you already had values stored on the column due to datatype mismatch.
s
I tried with a new db, but the issue remained
i mean I cleaned the table that I had the column, but I got the same result
a
Can you share the code that is causing this error?