Log message #4182158

# At Username Text
# Apr 4th 2019, 14:57 xavier83ar the thing is that there are more that one external source that feed the table
# Apr 4th 2019, 14:56 admad and truncate the table to reset autoincrement :slightly_smiling_face:
# Apr 4th 2019, 14:54 gapiangco a primary key using UNSIGNED BIGINT data type won't worry you to reach it limits :slightly_smiling_face:
# Apr 4th 2019, 14:54 xavier83ar cakephp 3.7.4
# Apr 4th 2019, 14:54 xavier83ar line 2080
# Apr 4th 2019, 14:54 xavier83ar src\Cake\ORM\Table::_insert()
# Apr 4th 2019, 14:53 xavier83ar bake command generate the table object with the standard 'id' key, I've removed, but I got this error anyway 'Cannot insert row in "%s" table, it has no primary key.',
# Apr 4th 2019, 14:51 xavier83ar so I've tried to do so, remove the id and rebake model layer.. no problem so far
# Apr 4th 2019, 14:50 xavier83ar I may use other type of primary key... but I do realize that I don't need one
# Apr 4th 2019, 14:49 xavier83ar but if I use an autoincremente id, every time the table is updated, the id would keep increasing, reaching limits soons
# Apr 4th 2019, 14:48 xavier83ar no need for deleted or edit single record
# Apr 4th 2019, 14:48 xavier83ar it's a table that's like a temporal table, a cache of many others sources, everytime it gets updated by a source it removes all records from that source and insert new ones
# Apr 4th 2019, 14:47 dereuromark pretty sure it does, why would you ever want that though
# Apr 4th 2019, 14:46 xavier83ar Hi guys, does the cakephp 3 ORM support insert records to a table without a primary key?
# Apr 4th 2019, 14:46 this.impetus nvm, guess-solved that one
# Apr 4th 2019, 14:44 asdfgh i will use char 36
# Apr 4th 2019, 14:44 asdfgh thank you dereuromark
# Apr 4th 2019, 14:44 this.impetus If I want to use Inflector in an element, how do I access it? Simply beginning with ```Inflector::<method>``` gives me "Class 'Inflector' not found"
# Apr 4th 2019, 14:43 dereuromark there are more performant solutions using binary16, but that requires custom Type classes, as in shim plugin etc
# Apr 4th 2019, 14:43 dereuromark this should be well documented - as char 36 as simple default
# Apr 4th 2019, 14:42 asdfgh guys pardon, what is the correct column type (and length) for uuid ?
# Apr 4th 2019, 14:32 slackebot2 '123456', 'database' => 'database_name', 'prefix' => '', 'encoding' => 'utf8', 'timezone' => 'UTC', ); }```
# Apr 4th 2019, 14:32 weto.jc I'm following this tutorial, but importing the environment variable into database.php is giving the following error: ```syntax error, unexpected '(', expecting ')' in <b>/var/www/html/app/Config/database.php</b> on line <b>64</b>``` I can not continue ```class DATABASE_CONFIG { public $default = array( 'datasource' => 'Database/Mysql', 'persistent' => true, 'host' => env('MYSQL_URL', false), 'login' => 'admin', 'password' =>
# Apr 4th 2019, 14:24 this.impetus gotcha, ty
# Apr 4th 2019, 14:24 ricksaccous years have to be in the format '2012' => '2012'
# Apr 4th 2019, 14:24 weto.jc @ricksaccous, has access to reading and writing
# Apr 4th 2019, 14:23 this.impetus Also tried ```$this->Form->select('academic_year', $years)``` to the same effect
# Apr 4th 2019, 14:20 this.impetus Quick question re: form helper. Trying to pass an array of options to a select field, ```$this->Form->control('academic_year', ['type'=>'select', 'options' => $years])``` Each option reads as a year, but the actual values are just indexed 0-n. How do I set the values *and* the displayed option?
# Apr 4th 2019, 14:17 asdfgh thanks!
# Apr 4th 2019, 14:17 asdfgh ok
# Apr 4th 2019, 14:17 asdfgh i can set users hasMany Agents users hasMany companies and so on...or hasOne depends fi the relation is 1:1
# Apr 4th 2019, 14:17 ricksaccous also does the user have write access
# Apr 4th 2019, 14:17 ricksaccous @weto.jc does the user have read access to the db?
# Apr 4th 2019, 14:17 asdfgh ok
# Apr 4th 2019, 14:16 admad asdfgh: that works too
# Apr 4th 2019, 14:16 ricksaccous also the error you got that you posted i think just said that the user didn't have permission to that db
# Apr 4th 2019, 14:15 ricksaccous @weto.jc what did you name the database?
# Apr 4th 2019, 14:12 asdfgh admad yes, but now i have a doubt...if why is bette rto store the foreign_key in users that point to agents (for example) instead of using the user_id column in agents ?
# Apr 4th 2019, 14:11 weto.jc @ricksaccous I created the database and entered the data with Docker, the database and the tables were created correctly.
# Apr 4th 2019, 14:11 admad store the role/type too in users table along with foreign key
# Apr 4th 2019, 14:10 asdfgh using user_id in agents, companies and so on ?