Skip to content

Commit

Permalink
Avoid three-state boolean (TRUE / FALSE / NULL)
Browse files Browse the repository at this point in the history
This ensures the recurring tasks static is either TRUE or FALSE.
  • Loading branch information
ksylvest authored and rosa committed Aug 20, 2024
1 parent 978a1fd commit 5e48e47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class ChangeSolidQueueRecurringTasksStaticToNotNull < ActiveRecord::Migration[7.1]
def change
change_column_null :solid_queue_recurring_tasks, :static, false, true
end
end
4 changes: 2 additions & 2 deletions test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2024_07_19_134516) do
ActiveRecord::Schema[7.1].define(version: 2024_08_19_165045) do
create_table "job_results", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
t.string "queue_name"
t.string "status"
Expand Down Expand Up @@ -109,7 +109,7 @@
t.text "arguments"
t.string "queue_name"
t.integer "priority", default: 0
t.boolean "static", default: true
t.boolean "static", default: true, null: false
t.text "description"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
Expand Down

0 comments on commit 5e48e47

Please sign in to comment.