All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
7.0.1 (2024-04-24)
- eloquent/models/concerns: Define the same property ($casts, $attributes) in
HasSnakeCaseAttributes
! (a959e86)
7.0.0 (2024-04-16)
- Set minimum PHP version to ^8.3
- Rename schema blueprint helper method
userAudit
toblamable
- Rename schema blueprint helper method
userAuditInclTimestamps
toblamableInclTimestamps
- Rename migration property
dbm
todatabaseManager
- Add support for Laravel v11. (6860d35)
- Add helper method
rawColumn
to blueprint.
6.1.0 (2023-12-12)
- Add support for Laravel v10. (3cdfb91)
6.0.0 (2023-01-30)
- Migrate to PHP v8.2. (a1b15d5)
5.2.1 (2022-08-29)
- database/schema/blueprint: Define column "original_import_id" as string to be able to save uuid like ids. (ac4ef4c)
5.2.0 (2022-08-26)
- database/schema/blueprint: Add column "original_import_id" if the option "inclImportedBy" is set to true using the userAudit functions. (7b5513f)
5.1.1 (2022-07-26)
- database/schema/blueprint: Add missing column definition for "imported_by". (f2114d9)
5.1.0 (2022-07-26)
- database/schema/blueprint: Add option to add "imported_by" and "imported_at" when using the userAudit functions. (1c44981)
$table->userAudit('users', 0, ['inclImportedBy' => true]);
or
$table->userAuditInclTimestamps('users', 0, ['inclImportedBy' => true]);
5.0.1 (2022-06-10)
- database/schema/blueprint: Use correct parameter order for precision, when add soft deletes timestamps. (d4d8886)
5.0.0 (2022-05-31)
- schema/blueprint: Add option to include soft delete columns. (dc30dea)
- The method parameters declaration of
DMX\Support\Database\Schema::userAudit()
has changed!- old:
userAudit(string $referencedTo = 'users', array $referenceRestrictions = ['onUpdate' => 'no action', 'onDelete' => 'no action']): void
- new:
userAudit(string $referencedTo = 'users', array $options = []): void
- old:
- The method parameters declaration of
DMX\Support\Database\Schema::userAuditInclTimestamps()
has changed!- old:
userAuditInclTimestamps(string $referencedTo = 'users', int $precision = 0, array $referenceRestrictions = ['onUpdate' => 'no action', 'onDelete' => 'no action']): void
- new:
userAuditInclTimestamps(string $referencedTo = 'users', int $precision = 0, array $options = []): void
- old:
4.3.1 (2021-07-21)
- eloquent/model/concerns: Use array_key_exists() instead of isset() to determine if data set in request, to be able to save fields set to null! (709f987)
4.3.0 (2021-07-16)
- database/blueprint: Make the user audit reference restrictions configurable. (0832864)
4.2.1 (2021-07-16)
- database/schema: Use ANSI-SQL "no action" for on delete reference restrictions to be more compatible to MS SQL Server. (db5a51d)
4.2.0 (2021-07-14)
- database/migration: Add methods to create and drop database schemas if the driver supports it. (bed749d)
4.1.0 (2021-07-06)
- eloquent: Use optional schemas also with MSSQL databases. (71de35d)
4.0.1 (2021-07-06)
- database/schema: Use Laravel's built-in methods to set the current timestamp instead of using a expression to make them more compatible to other database systems. (487c5d2)
4.0.0 (2021-06-22)
- eloquent: Add 2 new traits. (0e5a5b6)
- eloquent: Move trait HasSnakeCaseAttributes to \DMX\Support\Database\Eloquent\Models\Concerns. (e3ce4f74)
3.4.0 (2021-06-09)
- eloquent/models: Enhance the HasSnakeCaseAttributes trait. (f0b8080)
3.3.0 (2020-10-29)
- Add support for laravel framework 7.x and 8.x. (2d28091)
3.2.1 (2020-01-22)
- model/concerns/DbSchema: Do not add the db schema twice to the table name! (3471869)
3.2.0 (2020-01-21)
- eloquent: Add optional schema name to table name if the database engine does not support db-schemas. (45d1581)
3.1.0 (2020-01-17)
- database/schema: Enhance the blueprint and provide methods to columns used for user audit. (96cc4d5)
3.0.0 (2020-01-17)
- *: Move the package to PHP 7.4.
2.3.0 (2019-10-31)
- database/eloquent: Add trait to add a optional schema name property to a model. (9d60f15)
2.2.1 (2019-10-30)
- database/migrations: Throw the exception correctly only if no database manager is set and no Laravel helper functions are available. (74010d5)
2.2.0 (2019-10-30)
- database: Add lightly adopted Laravel based migration and blueprint classes. (83cb5f1)
2.1.1 (2019-10-25)
- database: Remove misplaced migration and blueprint classes. (05d6d64)
2.1.0 (2019-10-25)
- database: Add lightly adopted (Laravel)migration base class and (Laravel)blueprint. (f57443e)
- *: Move package to support laravel 6.0.
- *: Remove support for laravel 6.0, cause of an deprecated function issue.
- *: Dependencies updated to support laravel 6.0.
- traits: Check for an potentially existing method defined within the model before snake case the designated attribute (
getAttribute()
).
- traits: add HasSnakeCaseAttributes to use within Eloquent models
- overloads getAttribute() and setAttribute() to use snake case attribute names
- Example:
- Field in the database: "my_awesome_field"
- Use on model: $myModel->myAwesomeField
- Example:
- overloads getAttribute() and setAttribute() to use snake case attribute names
- traits: rename ProvidesIdentifierTrait to ProvidesIdentifier
- traits: add ProvidesIdentifierTrait
- Add basic methods to handle text based identifiers like UUID
- $obj->identifier() ... returns the identifier saved within the object
- Add basic methods to handle text based identifiers like UUID