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
0b6aa395
Commit
0b6aa395
authored
Oct 08, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for migration to allow migrating from current version to latest version.
parent
c0818ef2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
269 additions
and
71 deletions
+269
-71
Manager.php
lib/Doctrine/Manager.php
+4
-2
Migration.php
lib/Doctrine/Migration.php
+253
-51
index.php
playground/index.php
+12
-18
No files found.
lib/Doctrine/Manager.php
View file @
0b6aa395
...
...
@@ -284,7 +284,8 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
'dblib'
=>
'Doctrine_Connection_Mssql'
,
'firebird'
=>
'Doctrine_Connection_Firebird'
,
'informix'
=>
'Doctrine_Connection_Informix'
,
'mock'
=>
'Doctrine_Connection_Mock'
);
'mock'
=>
'Doctrine_Connection_Mock'
,
'resource'
=>
'Doctrine_Connection_Resource'
);
if
(
!
isset
(
$drivers
[
$driverName
]))
{
throw
new
Doctrine_Manager_Exception
(
'Unknown driver '
.
$driverName
);
}
...
...
@@ -308,7 +309,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
{
// silence any warnings
$parts
=
@
parse_url
(
$dsn
);
$names
=
array
(
'dsn'
,
'scheme'
,
'host'
,
'port'
,
'user'
,
'pass'
,
'path'
,
'query'
,
'fragment'
);
foreach
(
$names
as
$name
)
{
...
...
@@ -322,6 +323,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
}
switch
(
$parts
[
'scheme'
])
{
case
'resource'
:
case
'sqlite'
:
case
'sqlite2'
:
case
'sqlite3'
:
...
...
lib/Doctrine/Migration.php
View file @
0b6aa395
This diff is collapsed.
Click to expand it.
playground/index.php
View file @
0b6aa395
<?php
require_once
(
'playground.php'
);
$dsn
=
'mysql://jwage:elite1baller@localhost/doctrine_playground'
;
$conn
=
Doctrine_Manager
::
connection
(
$dsn
);
$manager
=
Doctrine_Manager
::
getInstance
();
$models
=
Doctrine
::
loadModels
(
'test_models'
);
$manager
->
setAttribute
(
Doctrine
::
ATTR_EXPORT
,
Doctrine
::
EXPORT_ALL
);
$conn
->
export
->
exportClasses
(
$models
);
$query
=
new
Doctrine_Search_Query
(
'Article'
);
$query
->
search
(
'test'
);
$results
=
$query
->
execute
();
print_r
(
$results
);
\ No newline at end of file
require_once
(
'connection.php'
);
class
MigrationTest
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
}
}
$migrate
=
new
Doctrine_Migration
(
'/Users/jwage/Sites/doctrine_trunk/playground/migration_classes'
);
$migrate
->
migrate
();
\ 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