Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add default value for entities.last_action (Trac #1562) #1562
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
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:
Upgrading from a 1.6.1 installation seems to work fine.
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 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.
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.