Thanks, I can see a duplicate key constraint error in your database:
mattermost-postgres-1 | 2023-01-18 10:59:31.986 UTC  ERROR: duplicate key value violates unique constraint "channels_name_teamid_key"
mattermost-postgres-1 | 2023-01-18 10:59:31.986 UTC  DETAIL: Key (name, teamid)=(ux-team, rp31g6k96b8oiktc5ze46kmxya) already exists.
mattermost-postgres-1 | 2023-01-18 10:59:31.986 UTC  STATEMENT: INSERT INTO Channels
mattermost-postgres-1 | (Id, CreateAt, UpdateAt, DeleteAt, TeamId, Type, DisplayName, Name, Header, Purpose, LastPostAt, TotalMsgCount, ExtraUpdateAt, CreatorId, SchemeId, GroupConstrained, Shared, TotalMsgCountRoot, LastRootPostAt)
mattermost-postgres-1 | VALUES
mattermost-postgres-1 | ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)
Please connect to your PostgreSQL DB and run the following query there in your mattermost database:
select id,createat,deleteat,teamid,type,displayname,name from channels where name IN ('town-square', '164ceb086f907e42b015de1395bccc2e5790f04c');
Let’s see if we can fix the database when we see what is in it.
While you are connected, please do also run the following queries so we can get an idea about the current state of your focalboard deployment:
select * from focalboard_schema_migrations;