File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed
Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 22
33database version control (postgres for now)
44
5+ # purpose
6+
7+ verdb manages the execution of postgres DDL scripts. It expects to be executed
8+ in a directory containing list of sub-directories, each of which corresponds
9+ to a set of changes. The sub-directories must contain an 'up.sql' and a 'down.sql'
10+ script. (although these filename may be changed)
11+
12+ The list, and order of the changes, must be maintained in a control file. This file
13+ is simply an order list of sub-directories. The pointer will point to a single
14+ sub-directory name contained in this file.
15+
16+ verdb maintains a pointer to the last batch (directory) of ddl scripts that
17+ executed correctly.
18+
519# example
620
721```
822verdb init database postgres batches
923verdb status
1024verdb up all
1125```
26+
27+ # install
28+
29+ With [ npm] ( https://npmjs.org ) do:
30+
31+ ```
32+ sudo npm install verdb -g
33+ ```
34+
35+ # license
36+
37+ MIT
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env coffee
2+ test = require (' tap' ).test
3+ set = require ' ../lib/set'
4+
5+ test " set" , (t ) ->
6+
7+ consol =
8+ log : (m ) ->
9+ t .equal m, " pointer set to v"
10+
11+ set .inject consol
12+
13+ nconf =
14+ set : (k , v ) ->
15+ t .equal k, ' pointer' , ' pointer set'
16+ t .equal v, ' v' , ' v set'
17+
18+ persist = (_nconf ) ->
19+ t .equal _nconf, nconf, " persist called with correct nconf"
20+
21+ set .run nconf, [' pointer' , ' v' ], persist
22+
23+ t .end ()
You can’t perform that action at this time.
0 commit comments