Parse Server running with postgres Parse error: error: column "_rperm" does not exist

Parse Server running with postgres Parse error: error: column "_rperm" does not exist

我已经设置了解析服务器以连接到 postgres 数据库。 数据库 URI:'postgres://postgres:mypassoword@localhost:5432/fantasy'。之后我用以下命令启动了服务器:nodejs index.js.

服务启动正常,但是当我尝试调用我的 API 时,我在 /var/log/postgresql/postgresql-9.6-main.log[=12 中收到跟随错误=]

postgres@fantasy ERROR: column "_rperm" does not exist at character 30 2019-10-01 21:44:47.468 -03 [10895] postgres@fantasy STATEMENT: SELECT * FROM "jogos" WHERE ("_rperm" IS NULL OR "_rperm" && ARRAY['','']) LIMIT 100

Parse 服务器(版本:)中的日志是:

error: Parse error: error: column "_rperm" does not exist {"code":1,"stack":"Error: error: column \"_rperm\" does not exist\n
at /root/parse-server-example/node_modules/parse-server/lib/Controllers/DatabaseController.js:1179:21\n at processTicksAndRejections (internal/process/task_queues.js:93:5)"}

我正在使用当前版本的解析服务器版本 3.9.0。

任何帮助将不胜感激。

按照@DaviMacêdo 的提示,我能够通过直接通过 Parse Dashboard 创建 objects/tables 来解决我的问题。

首先我必须创建自签名证书:

$ openssl req -newkey rsa:2048 -new -nodes -keyout key.pem -out csr.pem
$ openssl x509 -req -days 365 -in csr.pem -signkey key.pem -out server.crt

然后我创建了一个节点脚本来初始化解析服务器和解析仪表板。文件:dashboard.js:

var fs = require('fs');
var http = require('http');
var https = require('https');
var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var ParseDashboard = require('parse-dashboard');
var app = express();
var port = 1337;

var options = {
    key: fs.readFileSync('./key.pem', 'utf8'),
    cert: fs.readFileSync('./server.crt', 'utf8'),
};

var parse = new ParseServer({
    databaseURI: 'postgres://postgres:dbpassword@localhost:5432/fantasy',
    appId: 'fantasy',
    masterKey: 'MyPa$$word',
    serverURL: 'http://localhost:1337/parse' 
});

var dashboard = new ParseDashboard({
    "apps": [{
        "serverURL": "https://myserver:1337/parse",
        "appId": "fantasy",
        "masterKey": "MyPa$$word",
        "appName": "Fantasy"
    }],
    "users": [{
        "user": "admin",
        "pass": "MyPa$$word"
    }]
});

app.use('/parse', parse);
app.use('/dashboard', dashboard);

var server = https.createServer(options, app).listen(port, function() {
    console.log("server listening on port " + port);
});

启动解析服务器和解析仪表板:

$ node dashboard.js &