diff --git a/db/migrate/20251027122605_add_completed_and_priority_to_todos.rb b/db/migrate/20251027122605_add_completed_and_priority_to_todos.rb new file mode 100644 index 0000000..192551f --- /dev/null +++ b/db/migrate/20251027122605_add_completed_and_priority_to_todos.rb @@ -0,0 +1,6 @@ +class AddCompletedAndPriorityToTodos < ActiveRecord::Migration[8.1] + def change + add_column :todos, :completed, :boolean, default: false, null: false + add_column :todos, :priority, :integer, default: 1, null: false + end +end diff --git a/db/migrate/20251027122702_add_active_to_projects.rb b/db/migrate/20251027122702_add_active_to_projects.rb new file mode 100644 index 0000000..7027b88 --- /dev/null +++ b/db/migrate/20251027122702_add_active_to_projects.rb @@ -0,0 +1,5 @@ +class AddActiveToProjects < ActiveRecord::Migration[8.1] + def change + add_column :projects, :active, :boolean, default: true, null: false + end +end diff --git a/db/schema.rb b/db/schema.rb index daba742..1dc928a 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,17 +10,20 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[8.1].define(version: 2025_10_27_095143) do +ActiveRecord::Schema[8.1].define(version: 2025_10_27_122702) do create_table "projects", force: :cascade do |t| + t.boolean "active", default: true, null: false t.datetime "created_at", null: false t.string "name" t.datetime "updated_at", null: false end create_table "todos", force: :cascade do |t| + t.boolean "completed", default: false, null: false t.datetime "created_at", null: false t.text "description" t.string "name" + t.integer "priority", default: 1, null: false t.datetime "updated_at", null: false end end