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

null value in column "firstanalysis" in analytics_used_analysables

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.5
    • Fix Version/s: None
    • Component/s: Analytics
    • Labels:
      None
    • Affected Branches:
      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

            Assignee:
            Unassigned
            Reporter:
            rezaie9 Shamim Rezaie
            Participants:
            Component watchers:
            Elizabeth Dalton, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: