-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.database.xml
51 lines (41 loc) · 1.69 KB
/
build.database.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="UTF-8"?>
<project name="drush-database" default="drush-database:update">
<!-- ## Properties -->
<property name="drush.bin" value="${project.basedir}/bin/drush" />
<property name="drush.source" value="" />
<property name="drush.target" value="" />
<property name="drush.dump.dir" value="/tmp" />
<!-- ## Targets -->
<target name="drush-database:create"
description="Creates a database.">
<exec command="${drush.bin} ${drush.target} sql-create -y"
passthru="true"
checkreturn="true" />
</target>
<target name="drush-database:update"
description="Performs database updates.">
<exec command="${drush.bin} ${drush.target} updb -y"
passthru="true"
checkreturn="true" />
</target>
<target name="drush-database:drop"
description="Drops the target database.">
<exec command="${drush.bin} ${drush.target} sql-drop -y"
passthru="true"
checkreturn="true" />
</target>
<target name="drush-database:sync"
description="Synchronises the database from source to target."
depends="drush-database:drop">
<exec command="${drush.bin} sql-sync ${drush.source} ${drush.target} -y"
passthru="true"
checkreturn="true" />
</target>
<target name="drush-database:sync-cached"
description="Synchronises the database from source to target with dump cached locally."
depends="drush-database:drop">
<exec command="${drush.bin} sql-sync ${drush.source} ${drush.target} -y --target-dump=${drush.dump.dir}/${phing.project.name}.sync.sql"
passthru="true"
checkreturn="true" />
</target>
</project>