diff --git a/src/api/.database_consistency.todo.yml b/src/api/.database_consistency.todo.yml index 81df5ebf65e..5c6ba476b75 100644 --- a/src/api/.database_consistency.todo.yml +++ b/src/api/.database_consistency.todo.yml @@ -1,8 +1,5 @@ --- Architecture: - available: - ThreeStateBooleanChecker: - enabled: false id: PrimaryKeyTypeChecker: enabled: false diff --git a/src/api/app/models/architecture.rb b/src/api/app/models/architecture.rb index 766f0e7953f..b5d5617646e 100644 --- a/src/api/app/models/architecture.rb +++ b/src/api/app/models/architecture.rb @@ -71,7 +71,7 @@ def discard_cache # Table name: architectures # # id :integer not null, primary key -# available :boolean default(FALSE) +# available :boolean default(FALSE), not null # name :string(255) not null, indexed # # Indexes diff --git a/src/api/db/migrate/20240927144404_add_not_null_to_architectures_available.rb b/src/api/db/migrate/20240927144404_add_not_null_to_architectures_available.rb new file mode 100644 index 00000000000..fa1aeb6070c --- /dev/null +++ b/src/api/db/migrate/20240927144404_add_not_null_to_architectures_available.rb @@ -0,0 +1,5 @@ +class AddNotNullToArchitecturesAvailable < ActiveRecord::Migration[7.0] + def change + change_column_null :architectures, :available, false + end +end diff --git a/src/api/db/schema.rb b/src/api/db/schema.rb index a21fd8a1cf2..6ce1b2e4a11 100644 --- a/src/api/db/schema.rb +++ b/src/api/db/schema.rb @@ -51,7 +51,7 @@ create_table "architectures", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_ci", options: "ENGINE=InnoDB ROW_FORMAT=DYNAMIC", force: :cascade do |t| t.string "name", null: false - t.boolean "available", default: false + t.boolean "available", default: false, null: false t.index ["name"], name: "arch_name_index", unique: true end