I cannot alter / create Boards or Cards anymore after migration from MariaDb to Postgresql.
The Error is:
{"timestamp":"2025-01-06 17:15:45.603 +01:00","level":"error","msg":"API ERROR","caller":"app/plugin_api.go:1003","plugin_id":"focalboard","code":"500","error":"\"pq: NULL-Wert in Spalte »insert_at« verletzt Not-Null-Constraint\"","api":"/api/v2/boards/bqk9qywczw3n99bycqpxyuhrfqw/blocks"}
in the database the dates look good, in the focalboard_blocks and focalboard_boards tables.
e.g:
id insert_at
0062aa85-4b5d-4336-8825-97685ea6bf69 2021-09-16 19:55:11.730935 +00:00
no NULL value anywhere.
any ideas?
versions
Mattermost-Version: 9.11.6
Databaseschema-Version: 127
Build-Nummer: 12182130320
Database: postgres
Heya Daniel! The Mattermost docs on PostgreSQL migrations might provide further guidance.
I would also recommend reading up on this thread regarding the current support status of Boards, and various other plugins if you haven’t already: Upcoming product changes to Boards and various plugins
Hope this helps!
Hi there
It turned out the Data Type of the “insert_at” column was incorrect.
I spun Up a fresh mattermost and took the typings from there.
2 Likes
john.combs
(John Combs)
January 14, 2025, 8:26pm
4
Yay! Thanks so much for following up with the solution, Daniel!
danielk
(Daniel K)
February 20, 2025, 1:33pm
5
Hello Daniel
I have the same problem and couldn’t fix it, could you elaborate on what you changed exactly?
hi
i did something like this
alter table focalboard_blocks
add insert_at timestamp(6) with time zone not null;
on any table with focalboard in the name
1 Like
danielk
(Daniel K)
February 20, 2025, 3:46pm
7
Thanks for your answer, that’s also what I tried (I even tried with changing timestamp(6) into timestamptz which is the usual postgres data type for this, but the error remains the same.