If the migration involves `PRAGMA writable_schema=ON`, you'd better discard the connection in which you did that and open a new one. Richard Hipp has suggested several ways to refresh the cached schema: From: <https://sqlite.org/forum/forumpost/29bad1c5c1> > There are many ways to force a check of the schema to see if it needs to be reread. Here is one: > `PRAGMA user_version;` From: <https://sqlite.org/forum/forumpost/8067ae2895> > OK, so it looks like you have to actually do something that needs to use the schema before the schema is checked. Something like this will suffice: > ` SELECT 1 FROM sqlite_master LIMIT 1;`