Closed larryli closed 8 years ago
@larryli how would you solve this issue?
@samdark Revert af75262
need to add a comment that this is intentionally the same as normal integer. also need a test that breaks in case someone will change it,
@cebe Doesn't it make more sense to throw an exception?
If I make a migration I specify big integer for a reason; I wouldn't be too happy if you silently went ahead and created a normal integer. That could cause me to get into trouble later when I use the application.
I think failing early is better; if needed the implementor could then fallback to normal int primary key by catching the exception.
If I make a migration I specify big integer for a reason; I wouldn't be too happy if you silently went ahead and created a normal integer. That could cause me to get into trouble later when I use the application.
What kind of trouble? SQLite INTEGER can store signed 8-bytes integer, same as MySQL BIGINT.
Ah, my bad. I thought it was about implicitly using another type that has a smaller domain. :8ball:
My 2 suggestions:
What steps will reproduce the problem?
'dsn' => 'sqlite:' . __DIR__ . '/../runtime/database.sqlite',
inconfig/db.php
on yii2-app-basic.Create a migration as:
What is the expected result?
What do you get instead?
Revert af75262541e83f353a36baf888b3392c9d34f201 changes
Additional info