Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions migration/db/migrations/202507090000000_module_analytics.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- +micrate Up
-- SQL in section 'Up' is executed when this migration is applied

ALTER TABLE mod
ADD COLUMN IF NOT EXISTS analytics_enabled BOOLEAN NOT NULL DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS analytics_interval_minutes INTEGER NOT NULL DEFAULT 5;

-- +micrate Down
-- SQL section 'Down' is executed when this migration is rolled back

ALTER TABLE mod
DROP COLUMN IF EXISTS analytics_enabled,
DROP COLUMN IF EXISTS analytics_interval_minutes;
4 changes: 4 additions & 0 deletions src/placeos-models/module.cr
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ module PlaceOS::Model
attribute udp : Bool = false
attribute makebreak : Bool = false

# analytics configuration
attribute analytics_enabled : Bool = false
attribute analytics_interval_minutes : Int32 = 5

# HTTP Service module
attribute uri : String = "", es_type: "keyword"

Expand Down
Loading