How do I change forum created date?

Recently I’ve moved my xenforo forum to discourse but now it shows “Created < 1 month ago” in the about page but the community was started in 2016, but its showing the discourse instance created date, how can I change this?

Did you import all your topics from Xenforo? AFAIK, that date will reflect the oldest post, which would be automatic if you migrated your content.

2 Likes

That’s not quite it. I had someone else who wanted to change that date before. I tracked down the query that gets this date and found a way to change it. I can’t remember and can’t find any notes I may have made.

You’d look at the HBS for the about page, then see where that comes from (it’s some query that gets . . . something sort of strange) and then update that record with whatever date you want.

Hopefully that’s enough of a hint. That’s my best free answer.

4 Likes

Yes, all the posts were imported, can confirm that!

Wow our AI response told that to me too, but I dismissed it as an hallucination because I couldn’t believe we would do that, but looks like it is indeed true :exploding_head:

So the AI solution is correct here @lilstranded

Just adding how to get there would be

# ssh into the server
cd /var/discourse
docker exec -it app bash
su postgres
psql
/connect discourse
UPDATE schema_migration_details SET created_at = '2016-01-01 00:00:00' WHERE id = 1;
\q
exit
exit
exit
1 Like

YES! That was it! I’m pretty sure that’s exactly what I did, except I’m pretty sure that I figured it out myself. :crying_cat:

Yeah. I figured that it was like that because you had to do something in case there were no posts or anything else to base it on.

I suppose someone could add something to base.rb that would set that to the oldest post in the post-import stuff that it does.

Am I the only one who does remember this? And I didn’t need AI? :rofl:

FYI:

3 Likes

We also use this in our existing_site? migration helper, I also always thought it was a bit odd that we didn’t store this information elsewhere, like even if we had some site table that had one row in it or something to correspond with the site model: