I've followed this guide http://compoundjs.com/docs to create a very basic REST server. It worked when using memory as storage. After that, I tried to move to mysql.
When executing "compound db migrate" (or update) the response is:
Perform migrate on
- mysql
1
But the database and tables are not created. Then, when starting the server or console, the database is created. But the tables are not. And migrate/update actions seems to not been working.
This is my schema.coffee file
Pin = define 'Pin', ->
property 'name', String
Book = define 'Book', ->
property 'link', String
property 'pin_id', Number
Pin.hasMany(Book, {as: 'books', foreignKey: 'pin_id'})
Book.belongsTo(Pin, {as: 'pin', foreignKey: 'pin_id'})
Those are my package.json dependencies
{ "ejs": "*"
, "ejs-ext": "latest"
, "express": "~3.x"
, "compound": ">= 1.1.0"
, "jugglingdb": ">= 0.1.0"
, "coffee-script": ">= 1.1.1"
, "stylus": "latest"
, "seedjs": "latest"
, "co-assets-compiler": "*"
}
Any help would be more than appreciated :)