mirror of
https://github.com/Freika/dawarich.git
synced 2026-05-23 06:58:32 -05:00
Add data migration to create tracks from points
This commit is contained in:
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
- Don't check for new version in production.
|
||||
- Area popup styles are now more consistent.
|
||||
- Notification about Photon API load is now disabled.
|
||||
|
||||
## Fixed
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ class OwnTracks::Params
|
||||
attr_reader :params
|
||||
|
||||
def initialize(params)
|
||||
@params = params.to_h.deep_symbolize_keys
|
||||
@params = Oj.load(params).to_h.deep_symbolize_keys
|
||||
end
|
||||
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
class CreatePhotonLoadNotification < ActiveRecord::Migration[8.0]
|
||||
def up
|
||||
return
|
||||
|
||||
User.find_each do |user|
|
||||
Notifications::Create.new(
|
||||
user:, kind: :info, title: '⚠️ Photon API is under heavy load', content: notification_content
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateTracksFromPoints < ActiveRecord::Migration[8.0]
|
||||
def up
|
||||
User.find_each do |user|
|
||||
Tracks::CreateJob.perform_later(user.id)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
||||
+1
-1
@@ -1 +1 @@
|
||||
DataMigrate::Data.define(version: 20250518174305)
|
||||
DataMigrate::Data.define(version: 20250704185707)
|
||||
|
||||
Reference in New Issue
Block a user