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
Add default value for entities.last_action (Trac #1562) #1562
Comments
cash wrote on 40163072-01-23 This brings up a point that I've been meaning to ask about: why was last_action added to the entities table? It doesn't seem to belong there and isn't used by anything. |
davetosh wrote on 40163151-08-31 cash this is something we plan on using in the near future so seeing as v1.7 is all about core changes, we decided to put it in there now. At the moment, you can access objects by time_updated but it will also be handy to pull out objects ordered by the last action to be carried out on them such as comments, ratings etc. |
trac user kkawahara wrote on 40165499-02-06 upgrade from 1.6 actually doesn't work - first time you try and do anything, the error shows up again (Field 'last_action' doesn't have a default value). |
brettp wrote on 40166241-06-11 I see the potential problem but it's not causing an error for me. Can anyone else confirm this error? |
trac user costelloc wrote on 40166390-05-07 I think kkawahara probably has the sql mode set to traditional. You can probably reproduce by issuing this command: set sql_mode = 'traditional' and then creating an entity. |
trac user kkawahara wrote on 40166652-02-28 mode is set to strict (STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION) is there any documentation that describes the proper mode to be in? |
brettp wrote on 40166716-12-18 This can be configured either per-instance or server-wide. To configure this at a per-instance level for Elgg, put this in engine/lib/database.php around line 62 (in 1.7), after the UTF8 call:
To configure for server wide, view Cash's link above. I'm hesitant to add another SQL query to the init functions in Elgg Core, so this should be corrected on the server side. I will update the documentation for the installation requirements, though. |
brettp wrote on 40166740-07-16 (In [svn:3981]) Refs #1562: Updated requirements for Elgg. |
cash wrote on 40166761-09-16 If he is getting errors, I believe that means a warning is being thrown on every entity creation. Wouldn't a better fix be to set the default value or specify a value for the column in the create entity query? |
brettp wrote on 40166786-07-09 Since column is completely unused in core, I'm fine putting a default value on it. I'd rather not touch all the update/create queries this late in 1.7's development. |
Title changed from |
Milestone changed to |
brettp wrote on 40169162-10-29 (In [svn:3984]) Fixes #1562: Added a default value for entities.last_action in the schema and as an upgraded. Bumped version number to 1.7 final. |
Original ticket http://trac.elgg.org/ticket/1562 on 40162925-04-12 by trac user kkawahara, assigned to unknown.
Elgg version: 1.7
trying to setup a new 1.7RC1 installation. After filling out system settings and clicking next, the following error appears:
Field 'last_action' doesn't have a default value
QUERY: INSERT into elgg_entities
(type, subtype, owner_guid, site_guid, container_guid, access_id, time_created, time_updated) values
('site',0, 0, 0, 0, 2, 1267356443, 1267356443)
Checking the SQL create script (mysql.sql) shows this table with an additional column (last_action) and it does not have a default value assigned.
The update SQL in the entity class does not include this column:
(from entities.sql)
return insert_data("insert into {$CONFIG->dbprefix}entity_subtypes (type, subtype, class) values ('$type','$subtype','$class')");
Upgrading from a 1.6.1 installation seems to work fine.
The text was updated successfully, but these errors were encountered: