forked from torrust/torrust-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [torrust#469] add update datetime for tracker stasts importation
Add a new column to the table `torrust_torrent_tracker_stats` with the datetime of the update date, which means the date when the stats (leechers and seeders) were synchronized from the tracker API.
- Loading branch information
1 parent
1769bf1
commit feffd09
Showing
5 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
migrations/mysql/20240312130530_torrust_add_update_data_to_tracker_stats.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- New field to track when stats were updated from the tracker | ||
ALTER TABLE torrust_torrent_tracker_stats ADD COLUMN updated_at DATETIME DEFAULT NULL; | ||
UPDATE torrust_torrent_tracker_stats SET updated_at = '1000-01-01 00:00:00'; | ||
ALTER TABLE torrust_torrent_tracker_stats MODIFY COLUMN updated_at DATETIME NOT NULL; |
2 changes: 2 additions & 0 deletions
2
migrations/sqlite3/20240312130530_torrust_add_update_data_to_tracker_stats.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- New field to track when stats were updated from the tracker | ||
ALTER TABLE torrust_torrent_tracker_stats ADD COLUMN updated_at TEXT DEFAULT "1000-01-01 00:00:00"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters