Welcome Guest, Not a member yet? Register   Sign In
Config/Migrations: default enabled/disabled confusion
#1

Good day,

I am doing an upgrade from 4.0.0-alpha2  to 4.0.2, and I am honestly confused here:
app/Config/Migrations.php: 
4.0.0-alpha2:
Code:
    /*
    |--------------------------------------------------------------------------
    | Enable/Disable Migrations
    |--------------------------------------------------------------------------
    |
    | Migrations are disabled by default for security reasons.
    | You should enable migrations whenever you intend to do a schema migration
    | and disable it back when you're done.
    |
    */
    public $enabled = false;


4.0.2:
Code:
    /*
    |--------------------------------------------------------------------------
    | Enable/Disable Migrations
    |--------------------------------------------------------------------------
    |
    | Migrations are enabled by default for security reasons.
    | You should enable migrations whenever you intend to do a schema migration
    | and disable it back when you're done.
    |
    */
    public $enabled = true;

First, release version is doing the absolute opposite than before. And what confuses me even more, 4.0.2 has this in the description: "enabled by default for security reasons" vs. "enable whenever you intend to do a schema migration and disable it back when you're done"

Could somebody please explain the best course of actions? So it should be enabled by default, do whatever migration by default, and then disable it and keep it disabled unless doing migration?

Thanks!
Reply
#2

Lonnie changed the default value to "true" in this commit Migrations should be enabled by default to remove a frustration of getting started.

I think the comment in the configuration file should be improved for more clarity, because it is confusing!
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#3

Yes, looks like I missed changing the comment out. But things should be expected to change from a beta to a final release. Smile
Reply
#4

Yes it's totally fine if things change. For my part, what I find confusing is the part where it says "enabled by default for security reasons". It should probably be something more like "enabled by default for your convenience".
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#5

Thanks for the clarification! So in the end, it should be kept disabled most of the time, except when actually doing DB migrations.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB