You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a Chamilo migrated, when viewing or downloading a resource file you get the An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'session_id' doesn't have a default value message
The text was updated successfully, but these errors were encountered:
So for the sake of documentation, the track_e_downloads table has been modified to replace c_id and down_session_id by one single resource_link_id which allows us to get the c_id and session_id through the resource_link table (and ResourceLink entity).
However, I don't see where we are migrating the data in the current migration.
As @christianbeeznest noted, I might have previously said that this data was not very important, but dropping it is practically removing forcibly information from a database, so I've asked him to add the necessary migration for that data to end up in resource_link. This might add considerable weight to 1.* -> 2.0 migrations, so a likely point of optimization would be to delete the data from track_e_downloads altogether before the migration if you don't need it.
In migration Version20220614165020, the down_session_id column is renamed to session_id
chamilo-lms/src/CoreBundle/Migrations/Schema/V200/Version20220614165020.php
Lines 36 to 37 in 75b3424
However, the TrackEDownloads entity has no $sessionId property, down_session_id column is deleted (but it doesn't exists) in the PR #5086 https://github.com/chamilo/chamilo-lms/pull/5086/files#diff-f5716d8b38a2eb470cbff6d387a561bb9122a26f75094dd3c369778148fa2734R21
With a Chamilo migrated, when viewing or downloading a resource file you get the
An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'session_id' doesn't have a default value
messageThe text was updated successfully, but these errors were encountered: