Mysql set default value to a json type column

From version 8.0.13 onwards, the documentation says (emphasis is mine): The BLOB, TEXT, GEOMETRY, and JSON data types can be assigned a default value only if the value is written as an expression, even if the expression value is a literal. You can make your default an expression by surrounding the literal value with parentheses: … Read more

Cannot create a new table after “DROP SCHEMA public”

The error message pops up when none of the schemas in your search_path can be found. Either it is misconfigured. What do you get for this? SHOW search_path; Or you deleted the public schema from your standard system database template1. You may have been connected to the wrong database when you ran drop schema public … Read more

SQLite Foreign Key

You still have to create the column checklist_id INTEGER before you add it as a Foreign key. So it would be: CREATE TABLE checklist ( _id INTEGER PRIMARY KEY AUTOINCREMENT, checklist_title TEXT, description TEXT, created_on INTEGER, modified_on INTEGER ); CREATE TABLE item ( _id INTEGER PRIMARY KEY AUTOINCREMENT, checklist_id INTEGER, item_text TEXT, item_hint TEXT, item_order … Read more

tech