Skip to content

Commit

Permalink
Merge branch 'master' of github.com:szabyg/nodext
Browse files Browse the repository at this point in the history
  • Loading branch information
Szaby Grünwald committed May 21, 2012
2 parents 1ec6a84 + bcc8ea4 commit ba3d17a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bin/nodext_storage_create
Expand Up @@ -9,6 +9,8 @@ unless schema

models = db.getModels schema, cfg

console.warn "This will delete existing data on SQL databases"

console.log "Automigrating the database schema..."
schema.automigrate ->
console.log "Done"
Expand Down
15 changes: 15 additions & 0 deletions bin/nodext_storage_update
@@ -0,0 +1,15 @@
#!/usr/bin/env coffee
cfg = require("#{__dirname}/../lib/configuration").getConfig()
db = require "#{__dirname}/../lib/database"

schema = db.getSchema cfg
unless schema
console.log "No datatabase schema configured, aborting"
process.exit()

models = db.getModels schema, cfg

console.log "Autoupdating the database schema..."
schema.autoupdate ->
console.log "Done"
process.exit()
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -3,7 +3,7 @@
"description": "Plugin-driven Node.js applications",
"keywords": ["server", "express", "extension", "framework"],
"author": "Henri Bergius",
"version": "0.1.1",
"version": "0.1.2",
"licenses": [{
"type": "MIT",
"url": "https://github.com/bergie/nodext/raw/master/LICENSE"
Expand All @@ -25,7 +25,8 @@
"main": "./lib/nodext",
"bin": {
"nodext": "./bin/nodext",
"nodext_storage_create": "./bin/nodext_storage_create"
"nodext_storage_create": "./bin/nodext_storage_create",
"nodext_storage_update": "./bin/nodext_storage_update"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit ba3d17a

Please sign in to comment.