The =~ operator matches the regular expression against a string, and it returns either the offset of the match from the string if it is found, otherwise nil.
#move 2:15
Move the cursor to the n in name. Enter visual block mode (ctrlv). Press j three times. Press I. Type in vendor_. Press esc.
For PostgreSQL, rename_column is implemented as a simple ALTER TABLE ... RENAME COLUMN ... and that does preserve the indexes.
The AOF log is an append only log, so there are no seeks, nor corruption problems if there is a power outage. Even if the log ends with an half-written command for some reason (disk full or other reasons) the redis-check-aof tool is able to fix it easily.
User.find_or_initialize_by(name: "Roger") do |user|
add_index :table_name, :column_name, :unique => true
add_index :table_name, [:column_name_a, :column_name_b], :unique => true