-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
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
default value not being set up #429
Comments
I have just recently added pull request to the main phalcon repo because I needed to support blob types. When I get time I will push bigint,tinyint and timestamp too. Hopefully they will make it into the 2.0.4 release. |
@mattvb91 That sounds nice. Do you have problems with default value not being set up or is just me? |
I seem to be having the same issue as you. Running v2.0.3 of the devtools. I will look into this the same time as adding support for the new datatypes. I will update this issue if I have a branch you can test on. |
any news about this issue? |
@stefanchiriac Curently we can use only Can you explain please about "default values" related issue? |
The problem is with mysql/mariadb when you have a default value on a column.
new Column('created_at', [
'type' => "TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP",
]); |
@stefanchiriac |
now seems to work to generate and apply a migration with default value, except when |
I'll try to deal with it |
@stefanchiriac I've tried to fix "default value" related issue. Can you please check it now in 2.0.x branch? |
I did some debugging myself and seems like the problem comes from the framework.
|
@stefanchiriac I've fixed default value in Phalcon (2.0.x branch) phalcon/cphalcon#10849. Can you please build Phalcon from 2.0.x branch and check now? |
@stefanchiriac You can try now with Phalcon 2.0.x new Column('created_at', [
'type' => Column::TYPE_TIMESTAMP,
'notNull' => true,
'default' => 'CURRENT_TIMESTAMP'
]); |
all works fine now. Thanks |
👍 |
Hello,
If I set a default value doesn't seems to be considered when I run the migration
There are any plans to add support for bigint, tinyint, timestamp?
Thanks
The text was updated successfully, but these errors were encountered: