Saturday, December 20, 2014
Saturday, December 13, 2014
Rails: running a particular migration
This is an old Stackoverflow question - http://stackoverflow.com/questions/753919/run-a-single-migration-file
If the migration file is:
--
db/migrate/20141211192127_add_col1_to_table1.rb
class AddCol1ToTable1 < ActiveRecord::Migration
def change
add_column :table1, :col1, :boolean
end
end
--
Then, we have to do the following in Rails console:
> require Rails.root + "db/migrate/20141211192127_add_col1_to_table1.rb"
> AddCol1ToTable1.new.migrate(:up)
If the migration file is:
--
db/migrate/20141211192127_add_col1_to_table1.rb
class AddCol1ToTable1 < ActiveRecord::Migration
def change
add_column :table1, :col1, :boolean
end
end
--
Then, we have to do the following in Rails console:
> require Rails.root + "db/migrate/20141211192127_add_col1_to_table1.rb"
> AddCol1ToTable1.new.migrate(:up)
Wednesday, December 10, 2014
Sunday, December 7, 2014
An introduction to functional programming
https://codewords.hackerschool.com/issues/one/an-introduction-to-functional-programming
Imperative & corresponding Functional code has been used for explanations.
Imperative & corresponding Functional code has been used for explanations.
Labels:
algorithms,
programming,
software engineering
Thursday, December 4, 2014
ebook: Distributed Systems
Free 2013 ebook about Distributed Systems:
http://book.mixu.net/distsys/single-page.html
http://book.mixu.net/distsys/single-page.html
Subscribe to:
Posts (Atom)