To set an empty array as a default value in PostgreSQL, you can use sql operator with '{}' or ARRAY[] syntax:
MySQL
MySQL doesn’t have an array data type, but you can use json data type for the same purpose. To set an empty array as a default value in MySQL, you can use JSON_ARRAY() function or sql operator with ('[]') syntax:
The mode option defines how values are handled in the application. With json mode, values are treated as JSON object literal.
You can specify .$type<..>() for json object inference, it will not check runtime values. It provides compile time protection for default values, insert and select schemas.
SQLite
SQLite doesn’t have an array data type, but you can use text data type for the same purpose. To set an empty array as a default value in SQLite, you can use json_array() function or sql operator with '[]' syntax:
The mode option defines how values are handled in the application. With json mode, values are treated as JSON object literal.
You can specify .$type<..>() for json object inference, it will not check runtime values. It provides compile time protection for default values, insert and select schemas.