Canvas Data 2 Schema Out of Sync?

Jump to solution
cdellapietra
Community Member

Hi All,

Our group recently rebuilt our entire Canvas database with the release of DAP 1.1.0 (we were behind and using a deprecated version until that point). After dropping and initdb'ing all our tables again, everything was working again, with the exception of:

1. canvas.comment_bank_items, upon initializing, reports an attempt to insert a null value into a not null field, stopping initialization.

2. canvas_logs.web_logs, upon initializing, reports an attempt to insert an enum type label that doesn't exist for that type, stopping initialization.

Both problems suggest that perhaps our schema is not being updated correctly when initializing. How can I go about troubleshooting this problem? We are using Postgres, FYI.

Corey

0 Likes
1 Solution
LeventeHunyadi
Instructure
Instructure

canvas.comment_bank_items, as declared in the output schema, appears to have only mandatory columns, none of which accept NULL as a valid value. Please report this to Instructure support such that we can properly track the issue and make sure that we serve data that complies with the output schema. If you can share the primary key (id) of the row that is in violation of the schema, it helps our team take action.

Columns web_application_action and web_application_controller in the table canvas_logs.web_logs are known to have an incomplete list of values. Going forward, these columns will turn into so-called extensible enumerations. Rather than representing data as a PostgreSQL enumeration type with an explicit list of values, they will become foreign keys to a new table each of whose rows represent an enumeration value. The new table will be kept up-to-date automatically (rather than via a schema change), ensuring greater flexibility. You can read about this in a post by Bob O'Dell.

View solution in original post