Permalink
Browse files

Merge branch 'master' of github.com:szabyg/nodext

  • Loading branch information...
2 parents 1ec6a84 + bcc8ea4 commit ba3d17a33fa558dc7f951d2451031807e41be01d Szaby Grünwald committed May 21, 2012
Showing with 20 additions and 2 deletions.
  1. +2 −0 bin/nodext_storage_create
  2. +15 −0 bin/nodext_storage_update
  3. +3 −2 package.json
@@ -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"
View
@@ -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()
View
@@ -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"
@@ -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",

0 comments on commit ba3d17a

Please sign in to comment.