You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to generate my MySQL database tables from my node-orm models. Here's what I got:
var db = require('orm').db;
var User = db.define('user', {
name: String,
email: String,
token: String
});
db.drop(function(){
User.sync(function(){
});
});
I let the User.sync() generates the User table in my database, I had successfully done this before but now my tables have two primary keys with the same column as you can see on the image:
I've been getting "ER_OPERAND_COLUMNS: Operand should contain 1 column(s)" error everytime I want to add and instance of User to another model instance.
Does anyone know what can be causing this?
The text was updated successfully, but these errors were encountered:
I'm trying to generate my MySQL database tables from my node-orm models. Here's what I got:
I let the User.sync() generates the User table in my database, I had successfully done this before but now my tables have two primary keys with the same column as you can see on the image:
I've been getting "ER_OPERAND_COLUMNS: Operand should contain 1 column(s)" error everytime I want to add and instance of User to another model instance.
Does anyone know what can be causing this?
The text was updated successfully, but these errors were encountered: