/
info.html
231 lines (224 loc) · 9.36 KB
/
info.html
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
---
layout: ant
pill: info
subtitle: 'Ant Task: Info'
---
<div id="antTaskInfo">
<h1>Ant Task: Info</h1>
<p>Prints the details and status information about all the migrations.</p>
<a href="/documentation/command/info"><img src="/assets/balsamiq/command-info.png" alt="info"></a>
<h2>Usage</h2>
<pre class="prettyprint"><flyway:info /></pre>
<h2>Configuration</h2>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Attribute</th>
<th>Required</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>url</td>
<td>YES</td>
<td></td>
<td>The jdbc url to use to connect to the database</td>
</tr>
<tr>
<td>driver</td>
<td>NO</td>
<td><i>Auto-detected based on url</i></td>
<td>The fully qualified classname of the jdbc driver to use
to connect to the database
</td>
</tr>
<tr>
<td>user</td>
<td>NO</td>
<td></td>
<td>The user to use to connect to the database</td>
</tr>
<tr>
<td>password</td>
<td>NO</td>
<td></td>
<td>The password to use to connect to the database</td>
</tr>
<tr>
<td>schemas</td>
<td>NO</td>
<td><i>default schema of the connection</i></td>
<td>Case-sensitive list of schemas managed by Flyway.<br/>
The first schema will be the one containing the metadata table.
</td>
</tr>
<tr>
<td>table</td>
<td>NO</td>
<td>schema_version</td>
<td>The name of Flyway's metadata table.<br/>By
default (single-schema mode) the metadata table is placed in the default schema for the connection
provided by the datasource.<br/>When the <i>flyway.schemas</i> property is set (multi-schema mode),
the metadata table is placed in the first schema of the list.
</td>
</tr>
<tr>
<td>locations</td>
<td>NO</td>
<td>db/migration</td>
<td>Locations to scan recursively for migrations. The location type is determined by its prefix.<br/>
Unprefixed locations or locations starting with <code>classpath:</code> point to a package on the
classpath and may contain both sql and java-based migrations.<br/>
Locations starting with <code>filesystem:</code> point to a directory on the filesystem and may only
contain sql migrations.
</td>
</tr>
<tr>
<td>sqlMigrationPrefix</td>
<td>NO</td>
<td>V</td>
<td>The file name prefix for Sql migrations</td>
</tr>
<tr>
<td>repeatableSqlMigrationPrefix</td>
<td>NO</td>
<td>R</td>
<td>The file name prefix for repeatable Sql migrations</td>
</tr>
<tr>
<td>sqlMigrationSeparator</td>
<td>NO</td>
<td>__</td>
<td>The file name separator for Sql migrations</td>
</tr>
<tr>
<td>sqlMigrationSuffix</td>
<td>NO</td>
<td>.sql</td>
<td>The file name suffix for Sql migrations</td>
</tr>
<tr>
<td>encoding</td>
<td>NO</td>
<td>UTF-8</td>
<td>The encoding of Sql migrations</td>
</tr>
<tr>
<td>placeholderReplacement</td>
<td>NO</td>
<td>true</td>
<td>Whether placeholders should be replaced</td>
</tr>
<tr>
<td>placeholders</td>
<td>NO</td>
<td></td>
<td>Placeholders to replace in Sql migrations</td>
</tr>
<tr>
<td>placeholderPrefix</td>
<td>NO</td>
<td>${</td>
<td>The prefix of every placeholder </td>
</tr>
<tr>
<td>placeholderSuffix</td>
<td>NO</td>
<td>}
</td>
<td>The suffix of every placeholder</td>
</tr>
<tr>
<td>resolvers</td>
<td>NO</td>
<td></td>
<td>Fully qualified class names of custom
<a href="/documentation/api/javadoc/org/flywaydb/core/api/resolver/MigrationResolver">MigrationResolver</a>
implementations to be used in addition to the built-in ones for resolving Migrations to apply.</td>
</tr>
<tr>
<td>callbacks</td>
<td>NO</td>
<td></td>
<td>Fully qualified class names of
<a href="/documentation/api/javadoc/org/flywaydb/core/api/callback/FlywayCallback">FlywayCallback</a>
implementations to use to hook into the Flyway lifecycle.</td>
</tr>
<tr>
<td>skipDefaultCallbacks</td>
<td>NO</td>
<td>false</td>
<td>Whether default built-in callbacks (sql) should be skipped. If true, only custom callbacks are used.</td>
</tr>
<tr>
<td>target</td>
<td>NO</td>
<td><i>latest version</i></td>
<td>The target version up to which Flyway should consider migrations. Migrations with a higher version number will be ignored. The special value <code>current</code> designates the current version of the schema.
</td>
</tr>
<tr>
<td>outOfOrder</td>
<td>NO</td>
<td>false</td>
<td>Allows migrations to be run "out of order".
<p>If you already have versions 1 and 3 applied, and now a version 2 is found,
it will be applied too instead of being ignored.</p>
</td>
</tr>
<tr>
<td>classpath</td>
<td>NO</td>
<td></td>
<td>The Ant classpath used to load the JDBC driver and the
migrations
</td>
</tr>
<tr>
<td>classpathref</td>
<td>NO</td>
<td></td>
<td>The Ant classpath reference used to load the JDBC driver
and the migrations
</td>
</tr>
</tbody>
</table>
<h2>Sample configuration</h2><pre
class="prettyprint"><property name="flyway.driver" value="org.hsqldb.jdbcDriver"/>
<property name="flyway.url" value="jdbc:hsqldb:file:/db/flyway_sample"/>
<property name="flyway.user" value="SA"/>
<property name="flyway.password" value="mySecretPwd"/>
<property name="flyway.schemas" value="schema1,schema2,schema3"/>
<property name="flyway.table" value="schema_history"/>
<property name="flyway.locations" value="classpath:com.mycomp.db,db/mig,filesystem:/sql-mig"/>
<property name="flyway.sqlMigrationPrefix" value="Migration-"/>
<property name="flyway.repeatableSqlMigrationPrefix" value="RRR"/>
<property name="flyway.sqlMigrationSeparator" value="__"/>
<property name="flyway.sqlMigrationSuffix" value="-OK.sql"/>
<property name="flyway.encoding" value="ISO-8859-1"/>
<property name="flyway.placeholderReplacement" value="true"/>
<property name="flyway.placeholders.aplaceholder" value="value"/>
<property name="flyway.placeholders.otherplaceholder" value="value123"/>
<property name="flyway.placeholderPrefix" value="#["/>
<property name="flyway.placeholderSuffix" value="]"/>
<property name="flyway.resolvers" value="com.mycomp.MyResolver,com.mycomp.OtherResolver"/>
<property name="flyway.callbacks" value="com.mycomp.MyCallback,com.mycomp.OtherCallback"/>
<property name="flyway.skipDefaultCallbacks" value="false"/>
<property name="flyway.target" value="1.1"/>
<property name="flyway.outOfOrder" value="false"/></pre>
<h2>Sample output</h2>
<pre class="console">[flyway:info] +-------------+------------------------+---------------------+---------+
[flyway:info] | Version | Description | Installed on | State |
[flyway:info] +-------------+------------------------+---------------------+---------+
[flyway:info] | 1 | Initial structure | 2012-11-13 19:50:44 | Success |
[flyway:info] | 1.1 | Populate table | 2012-11-13 19:50:44 | Success |
[flyway:info] | 1.2 | Another user | 2012-11-13 19:50:44 | Success |
[flyway:info] | 1.3 | And his brother | 2012-11-13 19:50:44 | Success |
[flyway:info] +-------------+------------------------+---------------------+---------+</pre>
<p class="next-steps">
<a class="btn btn-primary" href="/documentation/ant/validate">Ant: validate <i class="fa fa-arrow-right"></i></a>
</p>
</div>