-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Old data invisible in some views after upgrade to v2.0.0 #4779
Comments
👋 @nh2 Thank you for the report! Seems like something went wrong either during "native stats start date" migration or during "stats start date" assignment. The latter one could produce a wrong date if somehow native stats start date was null and ClickHouse Would you be able to check what these values are set to in your PostgreSQL database? $ cd hosting # or wherever you clone https://github.com/plausible/community-edition (previously called https://github.com/plausible/hosting)
$ docker compose exec plausible_db psql -U postgres -h localhost -d plausible_db select * from sites where domain = 'yourdomain.com'; Ir would also be useful to know min/max dates from events_v2 table in your ClickHouse database $ docker compose exec plausible_events_db clickhouse client -d plausible_events_db select min(timestamp), max(timestamp) from events_v2 where site_id = `... the id from sites table in PostgreSQL`; |
Thanks for the quick reply!
It shows
|
So it seems like $ docker compose exec plausible_db psql -U postgres -h localhost -d plausible_db UPDATE sites WHERE id = 4 SET stats_start_date = '2021-07-14'; |
Small SQL syntax ordering issue, should be: UPDATE sites SET stats_start_date = '2021-07-14' WHERE id = 4; That fixed it, thank you very much @ruslandoga! I'll be glad to assist your debugging once you get to it. |
I checked NixOS/nixpkgs#253687 (comment) and according to your screenshot it seems like the dashboard has been accessed with some events in |
@ruslandoga Fine by me. However, I think it might save some people some hours if you update the text in https://github.com/plausible/analytics/releases/tag/v2.0.0 to add a sentence like
|
Thank you for the suggestion! I've updated the release notes and the OP in the discussion for that release. |
@ruslandoga Thanks! Also thanks for the extremely quick support, it made a long night a bit shorter! |
Past Issues Searched
Issue is a Bug Report
Using official Plausible Cloud hosting or self-hosting?
Self-hosting
Describe the bug
After executing the upgrade to v2.0.0 incuding the data migration, I can see old data (good) but only in some views such as Last 12 months (
?period=12mo
) I cannot view data older than the migration.All time and Custom range are broken: they start at today (the day I did the migration).
So the historical data is clearly there but Plausible seems to have gotten into a state where older dates cannot be selected in some views, based on the time of the migration (today).
Expected behavior
I can see all historical data in all views.
Screenshots
Last 12 months is working:
All time only shows today:
Custom range only lets me select today:
Output of the v2.0.0 migration script
Plausible.DataMigration.NumericIDs.run
:Environment
The text was updated successfully, but these errors were encountered: