An error occurred while loading the file. Please try again.
-
Andrea Gianarda authored
- SQLite doesn't allow to modify contraints of tables therefore a workaround to do so is to recreate the table from scratch. The old table is therefore cloned and the values are copied tot he newly created table. The cloning is done through the CREATE statement specifying the type of every column in order to keep it unchanged. If we were to clone and populate the table in one line using query "CREATE TABLE IF NOT EXISTS clone AS SELECT * FROM original", we might incur in a data type change. For example DATE columns are converted to NUM column in the clone table. The cloned table is populated using the INSERT statememnt and then the old table can be deleted. A new table with the desired contraints is then created and populated one line at a time or in one query. [MainDb] - Catch soci exception in the init or updateSchema function and pass them on to the calling function to be handled. - Make MainDb::isInitialized() return FALSE if the database initialization failed - In AbstractDb::connec...
98e83595