Skip to content

Commit

Permalink
- Fix migrations table DBGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
daycry committed Aug 26, 2022
1 parent f534a6f commit 27b3ae7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,29 @@
namespace Daycry\RestServer\Database\Migrations;

use CodeIgniter\Database\Migration;
use CodeIgniter\Database\Forge;

class CreateRestServerTables extends Migration
{
//protected $DBGroup = 'default';
protected $DBGroup = 'default';

/**
* Constructor.
*
* @param Forge $forge
*/
public function __construct(?Forge $forge = null)
{
$config = $this->_getConfig();
$this->DBGroup = $config->restDatabaseGroup;

parent::__construct($forge);
}

public function up()
{
$config = $this->_getConfig();

$this->DBGroup = $config->restDatabaseGroup;

/*
* Petitions
*/
Expand Down
18 changes: 15 additions & 3 deletions src/Database/Migrations/2022-04-12-000002_create_attempt_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,29 @@
namespace Daycry\RestServer\Database\Migrations;

use CodeIgniter\Database\Migration;
use CodeIgniter\Database\Forge;

class CreateAttemptTable extends Migration
{
//protected $DBGroup = 'default';
protected $DBGroup = 'default';

public function up()
/**
* Constructor.
*
* @param Forge $forge
*/
public function __construct(?Forge $forge = null)
{
$config = $this->_getConfig();

$this->DBGroup = $config->restDatabaseGroup;

parent::__construct($forge);
}

public function up()
{
$config = $this->_getConfig();

/*
* Petitions
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@
namespace Daycry\RestServer\Database\Migrations;

use CodeIgniter\Database\Migration;
use CodeIgniter\Database\Forge;

class CreateNamespaceTable extends Migration
{
//protected $DBGroup = 'default';
protected $DBGroup = 'default';

/**
* Constructor.
*
* @param Forge $forge
*/
public function __construct(?Forge $forge = null)
{
$config = $this->_getConfig();
$this->DBGroup = $config->restDatabaseGroup;

parent::__construct($forge);
}

public function up()
{
Expand Down

0 comments on commit 27b3ae7

Please sign in to comment.