Improved generation of db name.
This commit is contained in:
parent
b48ed93e9d
commit
fc47f04ba8
1 changed files with 2 additions and 2 deletions
|
@ -10,14 +10,14 @@ if [ "$RDB" == '' ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export RAND=`perl -e 'print rand(99999999)*100000'`
|
export RAND=`perl -e 'print int(rand(999999999))'`
|
||||||
DBNAME="$RNAME-$RAND"
|
DBNAME="$RNAME-$RAND"
|
||||||
DBFILE=config/database.yml
|
DBFILE=config/database.yml
|
||||||
DB_PRODUCTION=$DBNAME"_production"
|
DB_PRODUCTION=$DBNAME"_production"
|
||||||
DB_TEST=$DBNAME"_test"
|
DB_TEST=$DBNAME"_test"
|
||||||
DB_DEVELOPMENT=$DBNAME"_development"
|
DB_DEVELOPMENT=$DBNAME"_development"
|
||||||
|
|
||||||
echo "Creating $DBFILE for tests with $DBNAME"
|
echo "Creating $DBFILE for $RDB tests with $DBNAME"
|
||||||
|
|
||||||
if [ "$RDB" == 'mysql' ]; then
|
if [ "$RDB" == 'mysql' ]; then
|
||||||
echo "production:" > $DBFILE
|
echo "production:" > $DBFILE
|
||||||
|
|
Loading…
Reference in a new issue