SQLAlchemy + Postgres: “You might need to add explicit type casts” on merge

后端 未结 1 1990
抹茶落季
抹茶落季 2021-01-24 13:16

I have an app that uses SQLAlchemy, and it worked fine when I used SQLite. However, when I moved to PostgreSQL, I found myself unable to even do the merge. Here\'s the model tha

相关标签:
1条回答
  • 2021-01-24 13:56

    Column item_metadata defined as a string, so it must be a string. With SQLite it worked because SQLite uses dynamic typing. It does not enforce data type constraints. Data of any type can (usually) be inserted into any column.

    0 讨论(0)
提交回复
热议问题