29 Oct '17, 6pm

Migrations in #ActiveRecord (#RubyOnRails)

Migrations are stored as files in the db/migrate directory, one for each migration class. The name of the file is of the form YYYYMMDDHHMMSS_create_products.rb , that is to say a UTC timestamp identifying the migration followed by an underscore followed by the name of the migration. The name of the migration class (CamelCased version) should match the latter part of the file name. For example 20080906120000_create_products.rb should define class CreateProducts and 20080906120001_add_details_to_products.rb should define AddDetailsToProducts . Rails uses this timestamp to determine which migration should be run and in what order, so if you're copying a migration from another application or generate a file yourself, be aware of its position in the order.

Full article: http://guides.rubyonrails.org/active_record_migrations.html

Tweets

This is neat. I didn't know Active Record suppo...

api.rubyonrails.org 05 Nov '17, 1pm

Declare an enum attribute where the values map to integers in the database, but can be queried by name. Example: class Con...

Google Says Change Of Address Tool Unnecessary For HTTPS Migrations

Google Says Change Of Address Tool Unnecessary ...

seroundtable.com 16 Oct '17, 12pm

Since Google released their HTTPS ranking boost , SEOs and webmasters have been migrating their sites from HTTP to HTTPS. ...