type === 'datetime' && ! $this->isNull && $default === null && $insertMode ) { $this->default = date('Y-m-d H:i:s'); } else { $this->default = $default; } $this->md5 = md5($this->field); $this->trueType = preg_replace('@\(.*@s', '', $this->type); // length is unknown for geometry fields, // make enough space to edit very simple WKTs if ($columnLength === -1) { $columnLength = 30; } $this->length = preg_match('@float|double@', $this->type) ? 100 : $columnLength; $this->pmaType = match ($this->trueType) { 'set', 'enum' => $this->trueType, default => $this->type, }; /** * TODO: This property is useless at the moment. * It seems like a long time ago before refactoring into classes, * this kept track of how many timestamps are in the table. */ $this->firstTimestamp = $this->trueType === 'timestamp'; } }