Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
d0ee6cd1
Commit
d0ee6cd1
authored
Feb 17, 2008
by
gnat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pre/post Up/Down methods
parent
589e2314
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
12 deletions
+57
-12
Migration.php
lib/Doctrine/Migration.php
+57
-12
No files found.
lib/Doctrine/Migration.php
View file @
d0ee6cd1
...
...
@@ -325,22 +325,26 @@ class Doctrine_Migration
*/
protected
function
_doMigrate
(
$direction
)
{
if
(
!
method_exists
(
$this
,
$direction
))
{
return
;
}
$method
=
'pre'
.
$direction
;
$this
->
$method
();
if
(
method_exists
(
$this
,
$direction
))
{
$this
->
$direction
();
foreach
(
$this
->
_changes
as
$type
=>
$changes
)
{
$process
=
new
Doctrine_Migration_Process
();
if
(
!
empty
(
$changes
))
{
$funcName
=
'process'
.
Doctrine
::
classify
(
$type
);
if
(
!
empty
(
$changes
))
{
$process
=
new
Doctrine_Migration_Process
();
$process
->
$funcName
(
$changes
);
}
}
}
$method
=
'post'
.
$direction
;
$this
->
$method
();
}
/**
* migrate
*
...
...
@@ -580,4 +584,45 @@ class Doctrine_Migration
$this
->
_addChange
(
'removed_indexes'
,
$options
);
}
/**
* preUp
*
* @return void
*/
public
function
preUp
()
{
return
;
}
/**
* postUp
*
* @return void
*/
public
function
postUp
()
{
return
;
}
/**
* preDown
*
* @return void
*/
public
function
preDown
()
{
return
;
}
/**
* postDown
*
* @return void
*/
public
function
postDown
()
{
return
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment