Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
Migrations
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3namespace Config;
4
5use CodeIgniter\Config\BaseConfig;
6
7class Migrations extends BaseConfig
8{
9    /**
10     * --------------------------------------------------------------------------
11     * Enable/Disable Migrations
12     * --------------------------------------------------------------------------
13     *
14     * Migrations are enabled by default.
15     *
16     * You should enable migrations whenever you intend to do a schema migration
17     * and disable it back when you're done.
18     */
19    public bool $enabled = true;
20
21    /**
22     * --------------------------------------------------------------------------
23     * Migrations Table
24     * --------------------------------------------------------------------------
25     *
26     * This is the name of the table that will store the current migrations state.
27     * When migrations runs it will store in a database table which migration
28     * files have already been run.
29     */
30    public string $table = 'migrations';
31
32    /**
33     * --------------------------------------------------------------------------
34     * Timestamp Format
35     * --------------------------------------------------------------------------
36     *
37     * This is the format that will be used when creating new migrations
38     * using the CLI command:
39     *   > php spark make:migration
40     *
41     * NOTE: if you set an unsupported format, migration runner will not find
42     *       your migration files.
43     *
44     * Supported formats:
45     * - YmdHis_
46     * - Y-m-d-His_
47     * - Y_m_d_His_
48     */
49    public string $timestampFormat = 'Y-m-d-His_';
50
51    /**
52     * --------------------------------------------------------------------------
53     * Enable/Disable Migration Lock
54     * --------------------------------------------------------------------------
55     *
56     * Locking is disabled by default.
57     *
58     * When enabled, it will prevent multiple migration processes
59     * from running at the same time by using a lock mechanism.
60     *
61     * This is useful in production environments to avoid conflicts
62     * or race conditions during concurrent deployments.
63     */
64    public bool $lock = false;
65}