我对symfony非常陌生(阅读第一天)。我试图从一个类创建表。我使用命令成功创建了课程
php bin/console make:entity
。
这是课程:
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\DbUserRepository")
*/
class DbUser
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=100)
*/
private $username;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $role;
/**
* @ORM\Column(type="string", length=100)
*/
private $password;
/**
* @ORM\Column(type="string", length=150, nullable=true)
*/
private $names;
public function getId(): ?int
{
return $this->id;
}
public function getUsername(): ?string
{
return $this->username;
}
public function setUsername(string $username): self
{
$this->username = $username;
return $this;
}
public function getRole(): ?string
{
return $this->role;
}
public function setRole(?string $role): self
{
$this->role = $role;
return $this;
}
public function getPassword(): ?string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
public function getNames(): ?string
{
return $this->names;
}
public function setNames(?string $names): self
{
$this->names = $names;
return $this;
}
}
现在,我应该运行命令php bin/console make:migration
我得到的错误是:
2019-02-22T16:05:42 + 02:00 [错误]运行命令“ make:migration”时引发错误。消息:“请求的未知数据库类型oid,Doctrine \ DBAL \ Platforms \ PostgreSQL92Platform可能不支持。”
在AbstractPlatform.php第423行中: 请求了未知的数据库类型oid,Doctrine \ DBAL \ Platforms \ PostgreSQL92Platform可能不支持它。
那里没有类型oid
,为什么会出现此错误?