Name |
Last commit
|
Last update |
---|---|---|
bin | ||
lib | ||
spec | ||
.document | ||
.gitignore | ||
.rspec | ||
.travis.yml | ||
.yardopts | ||
AUTHORS.rdoc | ||
CHANGELOG.rdoc | ||
Gemfile | ||
Guardfile | ||
LICENSE.txt | ||
README.rdoc | ||
RELEASE.rdoc | ||
Rakefile | ||
TODO.rdoc | ||
annotate.gemspec |
Annotate should reset the cached information about columns because Annotate may output old information if we load ActiveRecord::Base class in migration files. For example, if we have a following migration file and execute 'rake db:migrate', Annote does not output the default value and a not null constraint of the `some_value` column. ```ruby class CreatePosts < ActiveRecord::Migration def change create_table :posts do |t| t.integer :some_value end # add a not null constraint to the some_value column # should update some_value with not null values # because records might exist which have null value in the some_value column Post.update_all(some_value: 1) change_column_null(:posts, :some_value, false) change_column_default(:posts, :some_value, 1) end end ``` This commit fixes the above issue.
Name |
Last commit
|
Last update |
---|---|---|
bin | Loading commit data... | |
lib | Loading commit data... | |
spec | Loading commit data... | |
.document | Loading commit data... | |
.gitignore | Loading commit data... | |
.rspec | Loading commit data... | |
.travis.yml | Loading commit data... | |
.yardopts | Loading commit data... | |
AUTHORS.rdoc | Loading commit data... | |
CHANGELOG.rdoc | Loading commit data... | |
Gemfile | Loading commit data... | |
Guardfile | Loading commit data... | |
LICENSE.txt | Loading commit data... | |
README.rdoc | Loading commit data... | |
RELEASE.rdoc | Loading commit data... | |
Rakefile | Loading commit data... | |
TODO.rdoc | Loading commit data... | |
annotate.gemspec | Loading commit data... |