src/Structure/Column.php
public function timestamp(bool $onUpdate = false): self
	{
		$this->type = 'timestamp';
		$this->default = 'NOT null DEFAULT CURRENT_TIMESTAMP' . ($onUpdate ? ' ON UPDATE CURRENT_TIMESTAMP' : '');
		$this->setDefault('CURRENT_TIMESTAMP');
		return $this;
	}
public function timestamp(bool $onUpdate = false): self
	{
		$this->type = 'timestamp';
		$this->default = 'NOT null DEFAULT CURRENT_TIMESTAMP' . ($onUpdate ? ' ON UPDATE CURRENT_TIMESTAMP' : '');
		$this->setDefault('CURRENT_TIMESTAMP');
		return $this;
	}
public function timestamp ( bool $ onUpdate = false ) : self { $ this -> type = 'timestamp' ; $ this -> default = 'NOT null DEFAULT CURRENT_TIMESTAMP' . ( $ onUpdate ? ' ON UPDATE CURRENT_TIMESTAMP' : '' ) ; $ this -> setDefault ( 'CURRENT_TIMESTAMP' ) ; return $ this ; }
Nastavi typ na timestamp (pri vytvoreni se ulozi datum)
@param bool $onUpdate true = datum se zmeni pri zmene
@return self
Nastavi typ na timestamp ( pri vytvoreni se ulozi datum )