• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

codeigniter4 / settings / 17488284278

05 Sep 2025 08:41AM UTC coverage: 85.088% (-0.4%) from 85.526%
17488284278

push

github

web-flow
update workflow for PHPUnit (#151)

194 of 228 relevant lines covered (85.09%)

18.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/Database/Migrations/2021-11-14-143905_AddContextColumn.php
1
<?php
2

3
namespace CodeIgniter\Settings\Database\Migrations;
4

5
use CodeIgniter\Database\Forge;
6
use CodeIgniter\Database\Migration;
7
use CodeIgniter\Settings\Config\Settings;
8

9
class AddContextColumn extends Migration
10
{
11
    private Settings $config;
12

13
    public function __construct(?Forge $forge = null)
14
    {
15
        $this->config  = config('Settings');
30✔
16
        $this->DBGroup = $this->config->database['group'] ?? null;
30✔
17

18
        parent::__construct($forge);
30✔
19
    }
20

21
    public function up()
22
    {
23
        $this->forge->addColumn($this->config->database['table'], [
30✔
24
            'context' => [
30✔
25
                'type'       => 'varchar',
30✔
26
                'constraint' => 255,
30✔
27
                'null'       => true,
30✔
28
                'after'      => 'type',
30✔
29
            ],
30✔
30
        ]);
30✔
31
    }
32

33
    public function down()
34
    {
35
        $this->forge->dropColumn($this->config->database['table'], 'context');
28✔
36
    }
37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc