summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-02 00:13:28 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-02 00:13:28 +0200
commitdb9bd097ec54964a93efccd3056bfcb4a9484052 (patch)
tree2760d2162ff0b97029ace476f51cee3d7ee6c17d /db/migrate
parentf7c3bf9e6869331be0c33c0cd24246c592bf0dff (diff)
Rewrite chapter seeds: multi-event support, drop is_primary, fix data
- seed_chapter now accepts events: array instead of flat rrule:/ start_time: params; each event hash supports rrule:, start_time:, tag_list:, location:, duration_hours: - Chapters with multiple open days now represented correctly (Stralsund: Thursday Chaostreff + 2nd/4th Saturday OpenSpace; Hamburg: 2nd Friday + last Tuesday; Stuttgart: 1st Tuesday + 3rd Wednesday; Freiburg: Mon+Tue open + biweekly Plenum; Backnang: 3rd Sunday + 1st Tuesday; Tübingen: last Sunday + 2nd Monday at different venues) - is_primary removed from migration entirely — replaced by tag_list: 'open-day' on events - Stale EN descriptions corrected: Berlin, Darmstadt, Erlangen, Essen, Freiburg, Göttingen, Hamburg, Hannover, Karlsruhe, Paderborn, Stuttgart, Ulm - chaostreff-stralsund duplicate entry removed (Port39 is erfa only)
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20260627233640_upgrade_events_and_nodes_for_standalone_events.rb5
1 files changed, 0 insertions, 5 deletions
diff --git a/db/migrate/20260627233640_upgrade_events_and_nodes_for_standalone_events.rb b/db/migrate/20260627233640_upgrade_events_and_nodes_for_standalone_events.rb
index 790a62b..2605e5c 100644
--- a/db/migrate/20260627233640_upgrade_events_and_nodes_for_standalone_events.rb
+++ b/db/migrate/20260627233640_upgrade_events_and_nodes_for_standalone_events.rb
@@ -4,10 +4,6 @@ class UpgradeEventsAndNodesForStandaloneEvents < ActiveRecord::Migration[8.1]
4 change_column_null :events, :node_id, true 4 change_column_null :events, :node_id, true
5 add_column :events, :title, :string 5 add_column :events, :title, :string
6 add_column :events, :description, :text 6 add_column :events, :description, :text
7 add_column :events, :is_primary, :boolean, default: false, null: false
8
9 # Mark all existing events as primary (they were all 1:1 with nodes)
10 Event.where.not(node_id: nil).update_all(is_primary: true)
11 7
12 # Occurrences: make node optional 8 # Occurrences: make node optional
13 change_column_null :occurrences, :node_id, true 9 change_column_null :occurrences, :node_id, true
@@ -19,7 +15,6 @@ class UpgradeEventsAndNodesForStandaloneEvents < ActiveRecord::Migration[8.1]
19 def down 15 def down
20 remove_column :nodes, :external_url 16 remove_column :nodes, :external_url
21 change_column_null :occurrences, :node_id, false 17 change_column_null :occurrences, :node_id, false
22 remove_column :events, :is_primary
23 remove_column :events, :description 18 remove_column :events, :description
24 remove_column :events, :title 19 remove_column :events, :title
25 change_column_null :events, :node_id, false 20 change_column_null :events, :node_id, false