Skip to content

Commit

Permalink
Add support for Semantic Versioning (semver.org) in database generati…
Browse files Browse the repository at this point in the history
…on script
  • Loading branch information
ginatrapani committed Mar 12, 2012
1 parent 9c53fd5 commit 62796fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions extras/scripts/getversion.php
@@ -0,0 +1,5 @@
<?php
chdir(dirname(dirname(dirname(__FILE__))));
require_once 'webapp/install/version.php';

echo $THINKUP_VERSION;
2 changes: 1 addition & 1 deletion extras/scripts/migratedb
Expand Up @@ -31,7 +31,7 @@ $mysqldump --create-options --skip-set-charset --skip-add-drop-table --no-data -


## set up app db version option
DB_VERSION=`cat ../../../install/version.php | grep 'THINKUP_VERSION =' | grep -o '[0-9]*\.[0-9]*'`;
DB_VERSION=`php ../../../../extras/scripts/getversion.php`;

echo "
--
Expand Down
4 changes: 2 additions & 2 deletions webapp/install/sql/build-db_mysql.sql
@@ -1,6 +1,6 @@
--
-- ThinkUp Database Creation Script
-- Auto-generated by thinkup/extras/scripts/migratedb script on 2012-02-27
-- Auto-generated by thinkup/extras/scripts/migratedb script on 2012-03-12
--

ALTER DATABASE DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Expand Down Expand Up @@ -481,7 +481,7 @@ CREATE TABLE tu_users (
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Service user details.';


-- Dump completed on 2012-02-27 16:37:49
-- Dump completed on 2012-03-12 13:21:41

--
-- Insert DB Version
Expand Down

0 comments on commit 62796fc

Please sign in to comment.