@@ -4,8 +4,8 @@ component accessors="true" {
4
4
property name = " configSettings" inject = " box:configSettings" ;
5
5
property name = " environment" default = " development" ;
6
6
property name = " manager" default = " cfmigrations.models.QBMigrationManager" ;
7
- property name = " migrationsDirectory" default = " / resources/database/migrations" ;
8
- property name = " seedsDirectory" default = " / resources/database/seeds" ;
7
+ property name = " migrationsDirectory" default = " resources/database/migrations/ " ;
8
+ property name = " seedsDirectory" default = " resources/database/seeds/ " ;
9
9
property name = " seedEnvironments" default = " development" ;
10
10
property name = " managerProperties" ;
11
11
@@ -156,7 +156,11 @@ component accessors="true" {
156
156
*
157
157
* @see dName string when provided, only this seed will be run
158
158
*/
159
- public MigrationService function seed ( string seedName ) {
159
+ public MigrationService function seed (
160
+ string seedName ,
161
+ function postProcessHook = variables .no op ,
162
+ function preProcessHook = variables .no op
163
+ ) {
160
164
if (
161
165
! isNull ( variables .environment ) && ! arrayContainsNoCase (
162
166
variables .seedEnvironments ,
@@ -171,7 +175,11 @@ component accessors="true" {
171
175
if ( ! directoryExists ( expandPath ( variables .seedsDirectory ) ) ) return this ;
172
176
173
177
findSeeds ( argumentCollection = arguments ).each ( function ( file ) {
174
- variables .manager .runSeed ( file .componentPath );
178
+ variables .manager .runSeed (
179
+ file .componentPath ,
180
+ postProcessHook ,
181
+ preProcessHook
182
+ );
175
183
} );
176
184
177
185
return this ;
0 commit comments