Error code
SQLite SQLITE_READONLY_DBMOVED
SQLITESQLITE_READONLY_DBMOVED
Database Error Code· An error code returned by a database server such as PostgreSQL or MySQL.
What it means
read-only: the database file has been moved since it was opened.
How to fix it
- Close and reopen the database connection after the file move is complete.
- Avoid replacing an open database file in-place.
- use atomic rename-into-place only when no connections are open.
- Implement a reconnection strategy that detects this error and reopens the handle.
Not affiliated with SQLite. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.
More SQLite codes
- SQLITE_AUTHauthorization denied — an authorizer callback blocked the operation
- SQLITE_BUSYdatabase file is locked — another connection holds a shared or reserved lock
- SQLITE_BUSY_SNAPSHOTWAL snapshot conflict — a snapshot-isolated read cannot see a newer WAL frame
- SQLITE_CANTOPENunable to open the database file
- SQLITE_CONSTRAINTa constraint violation was raised — the write violates a database rule
- SQLITE_CONSTRAINT_FOREIGNKEYFOREIGN KEY constraint failed — the referenced row does not exist
- SQLITE_CONSTRAINT_UNIQUEUNIQUE constraint failed — a duplicate value was inserted
- SQLITE_CORRUPTthe database file is malformed — on-disk structure is damaged
- SQLITE_FULLthe database or disk is full — no space for the write
- SQLITE_IOERRan I/O error occurred on the disk
- SQLITE_LOCKEDa table in the database is locked — conflict within the same connection
- SQLITE_MISMATCHdatatype mismatch — the value type does not fit the affinity