Yii DB 2.1

Yii DB version 2.1.0 was released. In this version:

  • Add UuidValue expression that represents a UUID value independently of DBMS
  • Support UnitEnum enums as column values
  • Add Identifier expression for strict identifier quoting
  • Add IdentifierQuoterInterface and implement it in Quoter
  • Add SerializationFailureException that is thrown when a transaction fails with SQLSTATE code 40001
  • Improve the exception message of DbUuidHelper::toUuid() when the value isn't a valid UUID
  • Refactor Query::queryScalar() to use a cloned Query object
  • Make $psrCache parameter of SchemaCache constructor and $schemaCache parameter of AbstractSchema and AbstractPdoConnection constructors optional, remove psr/simple-cache-implementation from require in composer.json
  • Index the result of AbstractSchema::getSchemaMetadata() by table name, so getSchemaChecks(), getSchemaDefaultValues(), getSchemaForeignKeys(), getSchemaIndexes(), getSchemaPrimaryKeys(), getSchemaUniques() and getTableSchemas() expose the table each item belongs to
  • Fix ColumnDefinitionParser to parse an unquoted DEFAULT NULL as SQL NULL instead of the string 'NULL'