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
27ae95af
Commit
27ae95af
authored
Jun 13, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dropDatabase() added
parent
1a14aa30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Sqlite.php
lib/Doctrine/Export/Sqlite.php
+20
-0
No files found.
lib/Doctrine/Export/Sqlite.php
View file @
27ae95af
...
@@ -33,6 +33,26 @@ Doctrine::autoload('Doctrine_Export');
...
@@ -33,6 +33,26 @@ Doctrine::autoload('Doctrine_Export');
*/
*/
class
Doctrine_Export_Sqlite
extends
Doctrine_Export
class
Doctrine_Export_Sqlite
extends
Doctrine_Export
{
{
/**
* drop an existing database
*
* @param string $name name of the database that should be dropped
* @throws Doctrine_Export_Exception if the database file does not exist
* @throws Doctrine_Export_Exception if something failed during the removal of the database file
* @return void
*/
public
function
dropDatabase
(
$name
)
{
$databaseFile
=
$this
->
conn
->
formatter
->
getDatabaseFile
(
$name
);
if
(
!@
file_exists
(
$databaseFile
))
{
throw
new
Doctrine_Export_Exception
(
'database does not exist'
);
}
$result
=
@
unlink
(
$database_file
);
if
(
!
$result
)
{
throw
new
Doctrine_Export_Exception
(
'could not remove the database file'
);
}
}
/**
/**
* Get the stucture of a field into an array
* Get the stucture of a field into an array
*
*
...
...
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