Skip to content

Commit

Permalink
fix: fix jdb folder name
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirHkrg committed Aug 14, 2024
1 parent 9319034 commit 0c10234
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/JsonDatabase/MigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use LaraGram\Console\Command;
use LaraGram\Support\Facades\Console;
use function Symfony\Component\Translation\t;

class MigrateCommand extends Command
{
Expand Down
2 changes: 0 additions & 2 deletions src/JsonDatabase/Migrations/stubs/migration.stub
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

namespace Database\Json\Migrations;

use LaraGram\JsonDatabase\Blueprint;
use LaraGram\JsonDatabase\Schema;

Expand Down
4 changes: 2 additions & 2 deletions src/JsonDatabase/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ private function initializePaths()
$this->database = $this->inferDatabaseName();
}

$data_path = $_ENV['JSON_DB_DATA_DIR'] . $this->database . '/Data/';
$this->filePath = $_ENV['JSON_DB_DATA_DIR'] . $this->database . '/Data/' . $this->database . '.json';
$data_path = $_ENV['JSON_DB_DATA_DIR'] . $this->database . '/data/';
$this->filePath = $_ENV['JSON_DB_DATA_DIR'] . $this->database . '/data/' . $this->database . '.json';
if (!file_exists($data_path)) mkdir($data_path, recursive: true);
if (!is_file($this->filePath)) file_put_contents($this->filePath, '[]');

Expand Down

0 comments on commit 0c10234

Please sign in to comment.