Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Commit db88071

Browse files
committed
Merge pull request #502 from localheinz/feature/doctrine-migrations
Enhancement: Use doctrine/migrations to modify the database schema
2 parents 9d8d597 + 7f58f37 commit db88071

File tree

11 files changed

+1290
-323
lines changed

11 files changed

+1290
-323
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ install:
2626
before_script:
2727
- cp config/autoload/travis.php.local.dist config/autoload/travis.local.php
2828
- mysql -uroot -e 'create database modules_test;'
29-
- mysql -uroot modules_test < data/sql/0.sql
29+
- php public/index.php migrations:migrate --no-interaction --verbose
3030

3131
script:
3232
- vendor/bin/php-cs-fixer fix --config-file=./.php_cs --dry-run --diff -v

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ test: composer
1111
cp config/autoload/travis.php.local.dist config/autoload/travis.local.php
1212
mysql -uroot -e 'DROP DATABASE IF EXISTS modules_test;'
1313
mysql -uroot -e 'CREATE DATABASE modules_test;'
14-
mysql -uroot modules_test < data/sql/0.sql
14+
php public/index.php migrations:migrate --no-interaction --verbose
1515
vendor/bin/phpunit --configuration phpunit.xml
1616
rm config/autoload/travis.local.php

build.xml

+6-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; composer install --no-dev'" />
2323
</target>
2424

25-
<target name="deploy" description="Deploys application to production" depends="git-reset, git-pull, composer-install">
25+
<target hidden="true" name="doctrine-migration">
26+
<echo message="Runs Doctrine migrations" />
27+
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; php public/index.php migrations:migrate --no-interaction --verbose'" />
28+
</target>
29+
30+
<target name="deploy" description="Deploys application to production" depends="git-reset, git-pull, composer-install, doctrine-migration">
2631
<echo message="Successfully deployed to production" />
2732
</target>
2833
</project>

composer.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
"license": "BSD-3-Clause",
55
"homepage": "https://zfmodules.com",
66
"require": {
7-
"evandotpro/edp-github": "0.2.*",
7+
"php": "~5.5",
88
"ext-intl": "*",
9+
"doctrine/doctrine-module": "^0.9.0",
10+
"doctrine/doctrine-orm-module": "^0.9.1",
11+
"doctrine/migrations": "^1.1",
12+
"evandotpro/edp-github": "0.2.*",
913
"ezyang/htmlpurifier": "4.6.*",
1014
"monolog/monolog": "~1.12",
1115
"phing/phing": "~2.10",
12-
"php": "~5.5",
1316
"socalnick/scn-social-auth": "1.14.1",
1417
"zendframework/zendframework": "~2.3.0",
1518
"zf-commons/zfc-user": "1.0.*",

0 commit comments

Comments
 (0)