diff options
author | Scott Chacon <schacon@gmail.com> | 2012-12-11 05:59:35 +0400 |
---|---|---|
committer | Scott Chacon <schacon@gmail.com> | 2012-12-11 06:02:39 +0400 |
commit | f1ddc1653a9ef40086ef934f5c3b877a5e6510bf (patch) | |
tree | 7e2e0aabb6e8e45c3c6169455e31491840823cb1 /db | |
parent | b101dca1933e7cbe5fa323fa05b21770d79bf3de (diff) |
make book regen more efficient
- save shas of each chapter so we don't reprocess stuff that hasn't
changed
- save directly to the database since we're running on the server now
- remove old remote task
- use logged in user so we have more API calls
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20121211011752_add_chapter_shas.rb | 9 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/db/migrate/20121211011752_add_chapter_shas.rb b/db/migrate/20121211011752_add_chapter_shas.rb new file mode 100644 index 00000000..0d1344e3 --- /dev/null +++ b/db/migrate/20121211011752_add_chapter_shas.rb @@ -0,0 +1,9 @@ +class AddChapterShas < ActiveRecord::Migration + def up + add_column :chapters, :sha, :string + end + + def down + remove_column :chapters, :string + end +end
\ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 78e53d43..8549b90f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120925124736) do +ActiveRecord::Schema.define(:version => 20121211011752) do create_table "books", :force => true do |t| t.string "code" @@ -27,6 +27,7 @@ ActiveRecord::Schema.define(:version => 20120925124736) do t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "number" + t.string "sha" end add_index "chapters", ["book_id"], :name => "index_chapters_on_book_id" |