code: public function initialize()
  	{
  		if (!$GLOBALS['TL_DCA'][$this->strTable]['config']['enableVersioning'])
  		{
  			return;
  		}
  
  		$objVersion = $this->Database->prepare("SELECT COUNT(*) AS count FROM tl_version WHERE fromTable=? AND pid=?")
  									 ->limit(1)
  									 ->execute($this->strTable, $this->intPid);
  
  		if ($objVersion->count > 0)
  		{
  			return;
  		}
  
  		$this->create();
  	}
docs: Create the initial version of a record