convert standar_log to legacy log

Re: convert standar_log to legacy log

by Ken Task -
Number of replies: 0
Picture of Particularly helpful Moodlers

Samples given @

https://docs.moodle.org/38/en/Configurable_reports#Creating_a_SQL_Report

all have a 'from' ... part is the table in the form of 'prefix_log'
prefix replaces true database prefix , typically that's been mdl_ as in config.php file.

The old logs are mdl_log.
The new logs are mdl_logstore_standard_log

So in your query, isn't the following possible in the query:
prefix_logstore_standard_log
and vice versa?

Code will log only to one log ... not both.
IF you have data in both now, changes query doesn't it?
Something more complicated cause you'd have to do 2 froms and combine data.

Are you sure you have data in both?

mysql> use moodle;
mysql> select * from mdl_log; on mine shows no records

bunch in mdl_log_store_standard_log

Combining them?

You'd have to compare the structure of old vs new to see if old
data could be exported as an sql dump and then imported into new.

The explain table name command from mysql client would show structure.

Just how far back in time do you think you have?  Either table.  That's not a question for response but for investigation in your DB server.

'SoS', Ken