Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-68126

null value in column "firstanalysis" in analytics_used_analysables

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.7.5
    • None
    • Analytics
    • None
    • MOODLE_37_STABLE

    Description

      I was transferring a DB to PostgreSQL using the dbtrabsfer tool and I got the following error:

      Debug: ERROR: null value in column "firstanalysis" violates not-null constraint
      DETAIL: Failing row contains (24501, 1, prediction, 14115, null, 1583330689).
      INSERT INTO mdl_analytics_used_analysables (id,modelid,action,analysableid,firstanalysis,timeanalysed) VALUES($1,$2,$3,$4,$5,$6)
      [array (
        'id' => '24501',
        'modelid' => '1',
        'action' => 'prediction',
        'analysableid' => '14115',
        'firstanalysis' => NULL,
        'timeanalysed' => '1583330689',
      )]
      Error code: dmlwriteexception
      * line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
      * line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      * line 969 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      * line 1139 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
      * line 204 of /lib/dtl/database_importer.php: call to pgsql_native_moodle_database->import_record()
      * line 102 of /lib/dtl/database_mover.php: call to database_importer->import_table_data()
      * line 157 of /lib/dtl/database_exporter.php: call to database_mover->export_table_data()
      * line 86 of /admin/tool/dbtransfer/locallib.php: call to database_exporter->export_database()
      * line 191 of /admin/tool/dbtransfer/cli/migrate.php: call to tool_dbtransfer_transfer_database()
       
       
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            rezaie9 Shamim Rezaie
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: