diff options
Diffstat (limited to 'common/changelog/testscript')
-rw-r--r-- | common/changelog/testscript | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/common/changelog/testscript b/common/changelog/testscript new file mode 100644 index 0000000..9368938 --- /dev/null +++ b/common/changelog/testscript @@ -0,0 +1,66 @@ +# file : common/changelog/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +headers = [paths] $path_search($src_base/*.hxx) + +odb_options = --generate-schema-only \ + --schema-format sql \ + --suppress-migration \ + --options-file $out_base/odb.options + +: mysql +: +if $mysql +{ + odb_options += --database 'mysql' --changelog-dir $~ + + for h: $headers + n = $base($leaf($h)) + + $* $odb_options -DBVER=1 -DCVER=1 --init-changelog $h &$(n).xml &$(n).sql + + $* $odb_options -DBVER=1 -DCVER=2 $h + diff $src_base/$n-mysql-diff.xml $(n).xml + + $* $odb_options -DBVER=2 -DCVER=3 $h + diff $src_base/$n-mysql-patch.xml $(n).xml + end +} + +: sqlite +: +if $sqlite +{ + odb_options += --database 'sqlite' --changelog-dir $~ + + for h: $headers + n = $base($leaf($h)) + + $* $odb_options -DBVER=1 -DCVER=1 --init-changelog $h &$(n).xml &$(n).sql + + $* $odb_options -DBVER=1 -DCVER=2 $h + diff $src_base/$n-sqlite-diff.xml $(n).xml + + $* $odb_options -DBVER=2 -DCVER=3 $h + diff $src_base/$n-sqlite-patch.xml $(n).xml + end +} + +: pgsql +: +if $pgsql +{ + odb_options += --database 'pgsql' --changelog-dir $~ + + for h: $headers + n = $base($leaf($h)) + + $* $odb_options -DBVER=1 -DCVER=1 --init-changelog $h &$(n).xml &$(n).sql + + $* $odb_options -DBVER=1 -DCVER=2 $h + diff $src_base/$n-pgsql-diff.xml $(n).xml + + $* $odb_options -DBVER=2 -DCVER=3 $h + diff $src_base/$n-pgsql-patch.xml $(n).xml + end +} |