Add a second public site to the same process: a 5x5 card of the 25 largest Russian datacenters where a cell is crossed out once an incident with a public source is recorded (Yandex Sasovo and Kaluga drone strikes on 2026-10-08/09 are seeded). config.ru dispatches by Host, so it rides the existing container, DB and bucket instead of a new deploy. The card is localized ru/en/uk with per-locale columns falling back to ru. Content is managed from /admin/bingo on asxp.io, reusing AdminAuth and CSRF. Photos go to the existing bucket under bingo/ and are proxied by the app, so the bucket stays private and storage needs no change. The seed data was fact-checked against operator sites and press on 2026-10-10; several entries in the original list were wrong or vague. Assisted-by: Claude:opus-5
39 lines
1.4 KiB
Ruby
39 lines
1.4 KiB
Ruby
Sequel.migration do
|
||
change do
|
||
# Datacenter bingo (served on BINGO_HOST). Localized fields are plain
|
||
# per-locale columns; ru is the source of truth, en/uk fall back to it.
|
||
create_table(:bingo_datacenters) do
|
||
primary_key :id
|
||
String :slug, null: false, unique: true
|
||
Integer :position, null: false
|
||
String :name_ru, null: false
|
||
String :name_en
|
||
String :name_uk
|
||
String :city_ru, null: false
|
||
String :city_en
|
||
String :city_uk
|
||
String :operator, null: false
|
||
String :mw # free-form number: "64", "≈36", "25–30"
|
||
String :status, null: false, default: 'operational' # | building
|
||
Integer :year
|
||
String :photo_key # MinIO key under bingo/
|
||
String :photo_source_url, text: true
|
||
String :photo_credit
|
||
String :info_url, text: true
|
||
DateTime :created_at, null: false
|
||
end
|
||
|
||
create_table(:bingo_incidents) do
|
||
primary_key :id
|
||
foreign_key :datacenter_id, :bingo_datacenters, null: false, on_delete: :cascade
|
||
Date :occurred_on, null: false
|
||
String :kind, null: false # strike | fire | outage | flood | cooling | other
|
||
String :title_ru, null: false
|
||
String :title_en
|
||
String :title_uk
|
||
String :url, text: true
|
||
DateTime :created_at, null: false
|
||
index :datacenter_id
|
||
end
|
||
end
|
||
end
|