I came across this article link below when I'm reviewing my Project ERD design, I supposed to read about Entity Relational Database and the difference between each entities but I ended up stuck on reading more on "ABC" as an Entrepreneur that work as an an Investor as well. Read more about it below.
Tuesday, June 28, 2011
Tuesday, June 14, 2011
Change a column data type with Rails migration
I always forget the syntax for this and I have to look it up, so I am going to post it here. Maybe this will help some others out. Basically, what I need to do is change the data type of a column in my database table. The table “address” contains a column/field named “postal_code” which was integer type. I want to change postal_code from an integer to a string. So first I create a rails migration with the following command.
class AlterPostalCodeToString < ActiveRecord::Migration
def self.up
change_table :addresses do |address|
address.change :postal_code, :string
end
change_table :company_addresses do |address|
address.change :postal_code, :string
end
end
def self.down
change_table :addresses do |address|
address.change :postal_code, :integer
end
change_table :company_addresses do |address|
address.change :postal_code, :integer
end
end
end
Friday, May 27, 2011
Checking database collation
http://dev.mysql.com/doc/refman/5.0/en/charset-database.html
show variables like "character_set_database";
show variables like "collation_database";
show variables like "collation_database";
Tuesday, May 24, 2011
Wednesday, March 23, 2011
Monday, March 7, 2011
Conditional stylesheets vs CSS hacks? Answer: Neither!
This is cool on the mouse moves draws a sketch on the path.
http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
Subscribe to:
Posts (Atom)