diff --git a/db/migrate/20210514125340_rename_todos_title_to_name.rb b/db/migrate/20210514125340_rename_todos_title_to_name.rb new file mode 100644 index 0000000..f51530f --- /dev/null +++ b/db/migrate/20210514125340_rename_todos_title_to_name.rb @@ -0,0 +1,5 @@ +class RenameTodosTitleToName < ActiveRecord::Migration[6.1] + def change + rename_column :todos, :title, :name + end +end diff --git a/db/schema.rb b/db/schema.rb index 4c75453..deb1b1e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,13 +10,13 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_05_13_223853) do +ActiveRecord::Schema.define(version: 2021_05_14_125340) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "todos", force: :cascade do |t| - t.string "title" + t.string "name" t.integer "index" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false