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
0c560d73
Commit
0c560d73
authored
Jun 19, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
997d066f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
Firebird.php
lib/Doctrine/Export/Firebird.php
+13
-3
Sqlite.php
lib/Doctrine/Export/Sqlite.php
+2
-1
No files found.
lib/Doctrine/Export/Firebird.php
View file @
0c560d73
...
...
@@ -502,16 +502,26 @@ class Doctrine_Export_Firebird extends Doctrine_Export
* 'charset' => 'utf8',
* 'collate' => 'utf8_unicode_ci',
* );
* @return
string
* @return
boolean
*/
public
function
createSequence
(
$seqName
,
$start
=
1
,
array
$options
=
array
())
{
$sequenceName
=
$this
->
conn
->
formatter
->
getSequenceName
(
$seqName
);
$this
->
conn
->
exec
(
'CREATE GENERATOR '
.
$sequenceName
);
$this
->
conn
->
exec
(
'SET GENERATOR '
.
$sequenceName
.
' TO '
.
(
$start
-
1
));
$this
->
dropSequence
(
$seqName
);
try
{
$this
->
conn
->
exec
(
'SET GENERATOR '
.
$sequenceName
.
' TO '
.
(
$start
-
1
));
return
true
;
}
catch
(
Doctrine_Connection_Exception
$e
)
{
try
{
$this
->
dropSequence
(
$seqName
);
}
catch
(
Doctrine_Connection_Exception
$e
)
{
throw
new
Doctrine_Export_Exception
(
'Could not drop inconsistent sequence table'
);
}
}
throw
new
Doctrine_Export_Exception
(
'could not create sequence table'
);
}
/**
* drop existing sequence
...
...
lib/Doctrine/Export/Sqlite.php
View file @
0c560d73
...
...
@@ -292,7 +292,8 @@ class Doctrine_Export_Sqlite extends Doctrine_Export
$this
->
conn
->
exec
(
'INSERT INTO '
.
$sequenceName
.
' ('
.
$seqcolName
.
') VALUES ('
.
(
$start
-
1
)
.
')'
);
return
true
;
}
catch
(
Doctrine_Connection_Exception
$e
)
{
// Handle error
// Handle error
try
{
$result
=
$db
->
exec
(
'DROP TABLE '
.
$sequenceName
);
}
catch
(
Doctrine_Connection_Exception
$e
)
{
...
...
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