-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
70 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
var path = require('path'); | ||
|
||
let app = require(path.resolve(__dirname, '../server/server')); | ||
var database = app.datasources.searchDS; | ||
|
||
|
||
var lbTables = [ | ||
'Attribute', | ||
'Department', | ||
'Ingredient', | ||
'Menu', | ||
'Recipe' | ||
]; | ||
|
||
//creating loopback necessary tables if no exists | ||
database.automigrate(lbTables, function(err) { | ||
if (err) throw err; | ||
|
||
console.log( 'Loopback tables [' + lbTables.toString() + '] created in ' + database.adapter.name ); | ||
database.disconnect(); | ||
|
||
// process.on('exit', function(code) { | ||
// return console.log(`Automigrate is competed`); | ||
// }); | ||
// process.exit(22); | ||
}); |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
|
||
|
||
// it's the place were we'll store all stuff. | ||
|
||
// And i want to have a remote methods and things, that i can easily call 'diets' and get stuff related only for ingredients | ||
|
||
// and then i'll came to a simple method where i only include or exclude ids | ||
'use strict'; | ||
|
||
module.exports = function(Attribute) { | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "Attribute", | ||
"plural": "attribute", | ||
"base": "PersistedModel", | ||
"idInjection": true, | ||
"options": { | ||
"validateUpsert": true | ||
}, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"required": true | ||
}, | ||
|
||
"type": { | ||
"type": "string", | ||
"required": true | ||
} | ||
}, | ||
"validations": [], | ||
"relations": {}, | ||
"acls": [], | ||
"methods": {} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.