summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-09 16:03:40 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-09 16:03:40 +0200
commit0f4288d91de7b48f7bbed832ca80246b0055cc64 (patch)
tree7be060513b02a5abaa48f135de090b8688ef1433 /db
parent9d32458491d79f8e06a706375030c78282f4427b (diff)
Drop nodes.external_url
The column moved to page.rb and was now written only by publish_draft! and by the chapter seed, and read by nothing. lib/tasks/pages.rake goes with it. backfill_external_url reads the dropped column. backfill_address is spent and no longer safe to re-run.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20260809135746_remove_external_url_from_nodes.rb5
-rw-r--r--db/seeds/chapters.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20260809135746_remove_external_url_from_nodes.rb b/db/migrate/20260809135746_remove_external_url_from_nodes.rb
new file mode 100644
index 00000000..0510d053
--- /dev/null
+++ b/db/migrate/20260809135746_remove_external_url_from_nodes.rb
@@ -0,0 +1,5 @@
1class RemoveExternalUrlFromNodes < ActiveRecord::Migration[8.1]
2 def change
3 remove_column :nodes, :external_url, :string
4 end
5end
diff --git a/db/seeds/chapters.rb b/db/seeds/chapters.rb
index 4d81e3cc..ba14252c 100644
--- a/db/seeds/chapters.rb
+++ b/db/seeds/chapters.rb
@@ -30,12 +30,13 @@ def seed_chapter(parent_id:, slug:, tag:, title_de:, description_de:,
30 end 30 end
31 31
32 # Create node 32 # Create node
33 node = parent.children.create!(slug: slug, external_url: external_url) 33 node = parent.children.create!(slug: slug)
34 node.reload 34 node.reload
35 35
36 # Set up draft with German translation 36 # Set up draft with German translation
37 draft = node.draft 37 draft = node.draft
38 draft.template_name = 'chapter_detail' 38 draft.template_name = 'chapter_detail'
39 draft.external_url = external_url
39 I18n.with_locale(:de) do 40 I18n.with_locale(:de) do
40 draft.title = title_de 41 draft.title = title_de
41 draft.abstract = location || "" 42 draft.abstract = location || ""