CI4 Mysql DB Forge Error with INT default value negitive. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: CI4 Mysql DB Forge Error with INT default value negitive. (/showthread.php?tid=86541) |
CI4 Mysql DB Forge Error with INT default value negitive. - pyromanci - 01-31-2023 Hi, I've run into a odd bug I think. I'm setting up a new CI4.3.1 and Mysql 8 project. In the migration I have a int field that has a default value that is a negative value. I thought it might be like using CURRENT_TIMESTAMP in a DATETIME or TIMESTAMP field and I would need to encase in RawSql(). As the table didn't get generated when it ran. It didn't help i changed the value positive and it work.So I made this command to test to see if it was negative values. PHP Code: use CodeIgniter\CLI\BaseCommand; When I ran it this was the output. Testing 3: PASS Testing 2: PASS Testing 1: PASS Testing 0: PASS Testing -1: FAILED Testing -2: FAILED Testing -3: FAILED Testing -4: FAILED I figured I would ask before digging into the system code, hoping it it's just something simple I've overlooked. RE: CI4 Mysql DB Forge Error with INT default value negitive. - kenjis - 01-31-2023 You set `unsigned`. |