We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<?php use Cycle\Migrations\Migration; class example_table_0001 extends Migration { protected const DATABASE = '[default]'; /** * Create tables, add columns or insert data here */ public function up() { $this->table('example_table'); ->addColumn('created', 'timestamp', [ 'nullable' => false, 'defaultValue' => \Cycle\Database\Injection\Fragment::__set_state(array( 'fragment' => 'CURRENT_TIMESTAMP', )), ]) ->create(); } /** * Drop created, columns and etc here */ public function down() { $this->table('example_table')->drop(); } };
The defaultValue alias of default option is not picked up by hasOption() because it checks…
defaultValue
default
hasOption()
The check connecting 3 back to 2 is missing, thus declaring column with "defaultValue" simply skips default values entirely.
I did not hit it initially because of MariaDB 10.4 setting timestamp columns as … DEFAULT NOW(). 10.10 does not, and entire system collapses.
… DEFAULT NOW()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
defaultValue
alias ofdefault
option is not picked up byhasOption()
because it checks…The check connecting 3 back to 2 is missing, thus declaring column with "defaultValue" simply skips default values entirely.
I did not hit it initially because of MariaDB 10.4 setting timestamp columns as
… DEFAULT NOW()
. 10.10 does not, and entire system collapses.The text was updated successfully, but these errors were encountered: