Permalink
Browse files

Add SQLite support (#24)

* Add SQLite support

* Use touch() to recreate the db file
  • Loading branch information...
1 parent b2fd5a8 commit 6e38be5cfc341d08e172eea2ec2e8b0f18e40433 @pmatseykanets pmatseykanets committed with freekmurze Jan 11, 2017
Showing with 19 additions and 0 deletions.
  1. +19 −0 src/TableDroppers/Sqlite.php
@@ -0,0 +1,19 @@
+<?php
+
+namespace Spatie\MigrateFresh\TableDroppers;
+
+use Illuminate\Support\Facades\DB;
+
+class Sqlite implements TableDropper
+{
+ public function dropAllTables()
+ {
+ $dbPath = DB::getConfig('database');
+
+ if (file_exists($dbPath)) {
+ unlink($dbPath);
+ }
+
+ touch($dbPath);
+ }
+}

0 comments on commit 6e38be5

Please sign in to comment.