EasyEngine / cron-command

Manages cron in EasyEngine
4 stars 9 forks source link

Remove NOT NULL constraint from `user` #23

Closed mrrobot47 closed 5 years ago

mrrobot47 commented 5 years ago

Cron entry creation fails due to NOT NULL constraint in db column user.

╭─root@server ~  
╰─# ee cron create site.local --command='ls' --schedule='@every 1h'        

PHP Fatal error:  Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: cron.user in /root/workspace/easyengine/php/class-ee-db.php:352
Stack trace:
#0 /root/workspace/easyengine/php/class-ee-db.php(352): PDOStatement->execute()
#1 /root/workspace/easyengine/php/EE/Model/Base.php(162): EE_DB->insert(Array)
#2 /root/workspace/easyengine/vendor/easyengine/cron-command/src/Cron_Command.php(115): EE\Model\Base::create(Array)
#3 [internal function]: Cron_Command->create(Array, Array)
#4 /root/workspace/easyengine/php/EE/Dispatcher/CommandFactory.php(96): call_user_func(Array, Array, Array)
#5 [internal function]: EE\Dispatcher\CommandFactory::EE\Dispatcher\{closure}(Array, Array)
#6 /root/workspace/easyengine/php/EE/Dispatcher/Subcommand.php(425): call_user_func(Object(Closure), Array, Array)
#7 /root/workspace/easyengine/php/EE/Runner.php(275): EE\Dispatcher\Subcommand->invoke(Array, Array, Array)
#8 /root/workspace/easyengine/php/EE/Runner.php(298): EE\Runner->run_command(Array, Ar in /root/workspace/easyengine/php/class-ee-db.php on line 352