Skip to content

Commit

Permalink
Merge pull request #146 from sunny/patch-1
Browse files Browse the repository at this point in the history
Add example in README for setting default values
  • Loading branch information
grobie authored Aug 9, 2017
2 parents 1209fe2 + 1ebc16c commit 0871939
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ActiveRecord::Base.establish_connection(
# and migrate
Lhm.change_table :users do |m|
m.add_column :arbitrary, "INT(12)"
m.add_column :locale, "VARCHAR(2) NOT NULL DEFAULT 'en'"
m.add_index [:arbitrary_id, :created_at]
m.ddl("alter table %s add column flag tinyint(1)" % m.name)
end
Expand Down

0 comments on commit 0871939

Please sign in to comment.