当我运行php artisan migrate命令它输出
在 Connection.php 第 664 行:
找不到驱动程序(SQL:select * from information_schema.tables where table_schema = employee and table_name = migrations)
在 PDOConnection.php 第 47 行:找不到驱动程序在 PDOConnection.php 第 43 行:找不到找司机
而且我还使用 ubuntu 16 和 PHP 版本 7.2.8 和 laravel 5.5 为 mysql、pgsql、sqlite im 启用了 pdo
我在猫鼬中有 2 个模式,如下所示:
点架构.js
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const PointSchema = new mongoose.Schema({
type: {
type: String,
enum: ['Point']
},
coordinates: {
type: [Number]
},
index: {
type: '2dsphere',
sparse: true
}
});
module.exports = {
PointSchema
};
Run Code Online (Sandbox Code Playgroud)
设备架构.js
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const PointSchema = require('./PointSchema').PointSchema;
const DeviceSchema = mongoose.Schema({
name: String,
location: {
type: PointSchema,
default: null
}
}, {
collection: 'devices',
timestamps: {
createdAt: 'created_at',
updatedAt: 'updated_at'
}
}); …Run Code Online (Sandbox Code Playgroud) 作为NodeJS和Mongo DB的新成员,我对它的托管和定价了解不多.我可以在自己的物理服务器/机器上自己托管网站.还有任何托管网站提供配置Node JS和MongoDb的工具.