1

Is there a way to check and/or update the dbVersion while inside sqlite3?

Looking for the equivalent of extJS db.version and db.changeVersion() from the terminal.

1 Answer 1

2

There is a #pragma statement that the database has built in which can be used to maintain a version of the database called 'user_version'. A link to some information can be found here user_version

The sql query for setting the user version is:

PRAGMA user_version = 1;

This sets the user_version and then every time the database/application starts this can be queried. Note: The user_version must be set before any tables or records are created within the database. It can be queried anytime after that though in order to find out the current version.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.