איך משנה תאריך יצירת הפורום?

לאחרונה העברתי את הפורום שלי מ-XenForo ל-Discourse, אבל עכשיו הוא מציג “נוצר לפני פחות מחודש” בדף על אודות, למרות שהקהילה הוקמה ב-2016. הוא מציג את תאריך יצירת ה-instance של Discourse. איך אפשר לשנות את זה?

2 לייקים

האם ייבאת את כל הנושאים שלך מ-Xenforo? לידע כללי, התאריך הזה ישקף את ההודעה הישנה ביותר, מה שיהיה אוטומטי אם העברת את התוכן שלך.

2 לייקים

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 לייקים

כן, כל הפוסטים יובאו, אפשר לאשר את זה!

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
4 לייקים

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.

לייק 1

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

FYI:

4 לייקים

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:

3 לייקים