mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-28 04:30:08 +02:00
Use CURRENT_TIMESTAMP as default value for timestampable entries.
Furthermore the database migration generation is now detects correctly if there were no changes to DB.
This commit is contained in:
parent
0ec73618ac
commit
4026f6be3f
6 changed files with 97 additions and 8 deletions
|
@ -42,14 +42,14 @@ trait TimestampTrait
|
|||
{
|
||||
/**
|
||||
* @var \DateTime The date when this element was modified the last time.
|
||||
* @ORM\Column(type="datetimetz", name="last_modified")
|
||||
* @ORM\Column(type="datetime", name="last_modified", options={"default"="CURRENT_TIMESTAMP"})
|
||||
* @Groups({"extended", "full"})
|
||||
*/
|
||||
protected $lastModified;
|
||||
|
||||
/**
|
||||
* @var \DateTime The date when this element was created.
|
||||
* @ORM\Column(type="datetimetz", name="datetime_added")
|
||||
* @ORM\Column(type="datetime", name="datetime_added", options={"default"="CURRENT_TIMESTAMP"})
|
||||
* @Groups({"extended", "full"})
|
||||
*/
|
||||
protected $addedDate;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue