From ae7ea8a4e5e23658d1830b7681e1075cca317830 Mon Sep 17 00:00:00 2001 From: Felix Eckhofer <felix@eckhofer.com> Date: Sun, 22 Dec 2024 15:31:58 +0100 Subject: [PATCH] Update DB from seeds --- db/seeds.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 4d66821..027a107 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -46,7 +46,7 @@ Conference.find_or_create_by!(slug: "37c3") do |c| c.location = "Congress Center Hamburg" end -Conference.find_or_create_by!(slug: "38c3") do |c| +Conference.find_or_create_by!(slug: "38c3").tap do |c| c.name = "38th Chaos Communication Congress (de-en)" c.time_zone = "Berlin" c.starts_at = DateTime.parse("27 December 2024 10:30 CET") @@ -56,9 +56,10 @@ Conference.find_or_create_by!(slug: "38c3") do |c| } c.import_job_class = "pretalx" c.location = "Congress Center Hamburg" + c.save! end -Conference.find_or_create_by!(slug: "38c3-more") do |c| +Conference.find_or_create_by!(slug: "38c3-more").tap do |c| c.name = "38th Chaos Communication Congress (more languages)" c.time_zone = "Berlin" c.starts_at = DateTime.parse("27 December 2024 10:30 CET") @@ -68,10 +69,11 @@ Conference.find_or_create_by!(slug: "38c3-more") do |c| } c.import_job_class = "pretalx" c.location = "Congress Center Hamburg" + c.save! end -%w[tribut Teal hdsjulian Sophie bergpiratin sblsg Max aerowaffle ningwie Senana ToniHDS].each do |username| - User.find_or_create_by(name: username) do |u| +%w[coverage fog comedy adjust forge fail vigorous promise chemistry conception meat storage certain warm develop civilian cousin injection hammer health appetite conventional good snake grant suspect atmosphere linen wrong deal calf sea management silence watch nuance loan quit convert failure bracket slice sweat treaty plot still chimpanzee assume functional marsh dream mail state dorm kid formation secular agile beach guide salesperson merit goalkeeper incongruous cart pig joystick regulation apparatus myth patent glue behead flu departure spectrum parking indication delay hesitate viable lay treat cooperative sensation auction sphere stain tap pass].each do |username| + User.find_or_create_by(name: username).tap do |u| u.email = "c3lingo+#{username}@x.moeffju.net" u.invitation_token = "gargamel" u.save! @@ -79,8 +81,8 @@ end end if token = fetch_credential("telegram_bot_token") - NotificationChannel.find_or_create_by(name: "telegram_group_chat") do |c| - c.token = token + NotificationChannel.find_or_create_by(name: "telegram_group_chat").tap do |c| + c.data = { token: token } c.save! end end -- GitLab