Drop the legacy notifications table (unused since the Noticed v2 migration in 2024)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu bằng cách tìm notifications trong app, lib và config, sau đó đọc định nghĩa bảng trong db/schema.rb và tệp rake cũ lib/tasks/deployment/20240604121427_migrate_notifications.rake. Thêm một migration có thể đảo ngược để xóa notifications cùng danh sách cột của nó. Sau đó xóa tệp rake và mọi mục tương ứng trong .standard_todo.yml. Công việc hoàn tất khi bin/rails db:migrate cập nhật db/schema.rb, noticed_events và noticed_notifications không thay đổi, và các spec liên quan đến thông báo đều vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The legacy notifications table (Noticed v1) has been unused since the 2024 upgrade to Noticed v2. The after_party task lib/tasks/deployment/20240604121427_migrate_notifications.rake copied its rows into noticed_events / noticed_notifications, and nothing has read or written it since. It still takes ~1.1 MB in production and shows up in db/schema.rb, which confuses people reading the schema (notifications vs noticed_notifications).
What to do
- Add a migration that drops the table:
drop_table :notifications. Strong Migrations is enabled, so give it a full reversible definition (pass the column list fromdb/schema.rbtodrop_tablesodowncan recreate it) and wrap it insafety_assuredif Strong Migrations asks. - Delete
lib/tasks/deployment/20240604121427_migrate_notifications.rake. It's the only code that touches the old table, and it has already run in production: after_party records it intask_records, so removing the file is safe. - Remove its entry from
.standard_todo.ymlif present. - Make sure nothing else refers to the old table:
grep -rn "notifications" app lib config.User#notificationsisclass_name: "Noticed::Notification"(the new table), so leave it alone. - Run
bin/rails db:migrateand commit the updateddb/schema.rb. Make surenoticed_eventsandnoticed_notificationsare untouched. - Run the notification specs:
spec/notifications,spec/requests/notifications_spec.rb,spec/lib/tasks/rake_tasks_constants_spec.rb.
Notes
- Heroku runs migrations automatically in the release phase, so this will apply on the next deploy.
- If you want to be extra careful, a maintainer can check that production's
notificationsrows were all migrated before merging (e.g. compare counts withnoticed_eventscreated before 2024-06-04), but the table hasn't been written since then either way.
Difficulty: beginner. One migration plus deleting one file.
- Ngôn ngữ chính
- Ruby
- Star
- 382
- Fork
- 547
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 46
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rubyforgood/casa
-
Remove leftover Cloud66 custom_web process from ProcfileCó thể đã có người làm @ShahadatTest đã nhận 1 ngày trước. Đang mởDifficulty: Easy Good First Issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
rubyforgood/casa#7330 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Remove the bin/bundle binstub (Heroku warns it can break Bundler on deploy)Có thể đã có người làm @KoushikSagarr đã nhận 1 ngày trước. Đang mởdependencies Difficulty: Easy Good First Issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
rubyforgood/casa#7325 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Difficulty: Easy Good First Issue Help Wanted javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
rubyforgood/casa#7311 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Difficulty: Easy Good First Issue Help Wanted javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rubyforgood/casa#7310 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Difficulty: Easy Good First Issue Help Wanted javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rubyforgood/casa#7309 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rubyforgood/casa
Issue tương tự
-
area/web interface
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
rubys/roundhouse#1757 ·
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
shakacode/react-on-rails-demo-flagship#102 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
akitaonrails/ai-book-2026#12 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
openfoodfoundation/openfoodnetwork#14970 ·
Maintainer thường phản hồi trong vòng 1 ngày