Skip to content

Commit 5e48e47

Browse files
ksylvestrosa
authored andcommitted
Avoid three-state boolean (TRUE / FALSE / NULL)
This ensures the recurring tasks static is either TRUE or FALSE.
1 parent 978a1fd commit 5e48e47

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class ChangeSolidQueueRecurringTasksStaticToNotNull < ActiveRecord::Migration[7.1]
2+
def change
3+
change_column_null :solid_queue_recurring_tasks, :static, false, true
4+
end
5+
end

test/dummy/db/schema.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.1].define(version: 2024_07_19_134516) do
13+
ActiveRecord::Schema[7.1].define(version: 2024_08_19_165045) do
1414
create_table "job_results", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
1515
t.string "queue_name"
1616
t.string "status"
@@ -109,7 +109,7 @@
109109
t.text "arguments"
110110
t.string "queue_name"
111111
t.integer "priority", default: 0
112-
t.boolean "static", default: true
112+
t.boolean "static", default: true, null: false
113113
t.text "description"
114114
t.datetime "created_at", null: false
115115
t.datetime "updated_at", null: false

0 commit comments

Comments
 (0)