Releases: phpfui/ORM
Fixed Composite Primary Keys
- Also added composite primary key test
Full Changelog: V3.0.0...V3.0.1
PostGre support
-
Added support for PostGreSQL
- Migrations for indexes and changing columns will have to be done by custom SQL queries in the Migration class.
-
Now supports SQLite insertOrIgnore and insertOrUpdate for the Record class
-
Added more unit tests
-
Porting to V3 from V2
- \PHPFUI\ORM\Migration::alterColumn takes only 3 parameters and does not rename the column. Use renameColumn instead.
Revert from PostGre porting
V2.0.09 Revert some PostGre porting
PHP 8.5 Support
- PHP 8.5 Support
- Start of PostGreSQL port, but it is not fully supported yet
- Revised unit tests to support different databases for testing
Better length for Decimal fields
- Decimal fields now have the correct length
- Fields with a length of zero pass the maxlength validator
- Updated documentation
Fix default value for empty values
Fixed setting a defaulted field to an empty value that had a different default value.
Default null fields are always set in Record
- Default null fields are always set in Record
- Related Records set from DataObject will return empty Record if id field is not set
Default Nullable Date and Time Fields fix
Nullable Date and Time fields with a CURRENT default should now correctly default to the current time when inserted or updated.
Limit fields updated on setFrom
The second parameter to setFrom is now an array of fields that will be set. This allows you to limit what fields get updated. The default is to update all fields appearing in the first parameter to setFrom().
This introduces a minor breaking change used for internal purposes and should not affect application code. The old second parameter (bool $loaded = false) is now the third parameter. PHPStan will detect this change if used.
Null related record assignment
- Set related record id to null if related record is empty and field is nullable. Previously set to zero.