initializeDatabase

suspend fun initializeDatabase()

Initialize the SQL database storage. This method creates the database and tables if they don't exist. If the database cannot be opened, it will attempt to restore from backup if available.

This method is globally synchronized per database name to prevent multiple parallel initializations of the same database, which is critical when SQLOathStorage and SQLPushStorage share the same database file.

Throws

if the database cannot be opened or the tables cannot be created.