错误:数据库“typeorm_DB”不存在

问题描述

我通过 Psql 创建了一个名为“typeorm_DB”的数据库

postgres=# \conninfo
You are connected to database "postgres" as user "postgres" on host "localhost" at port "5432".

\c typeorm_DB
You are Now connected to database "typeorm_DB" as user "postgres".

如果我输入 npm start 然后它来了:

Postgres : psql: FATAL: 数据库“typeorm_DB”不存在


ormconfig.json

{
   "type": "postgres","host": "localhost","port": 5432,"username": "postgres","password": "test","database": "typeorm_DB","synchronize": true,"logging": false,"entities": [
      "src/entity/**/*.ts"
   ],"migrations": [
      "src/migration/**/*.ts"
   ],"subscribers": [
      "src/subscriber/**/*.ts"
   ],"cli": {
      "entitiesDir": "src/entity","migrationsDir": "src/migration","subscribersDir": "src/subscriber"
   }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)