Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorScott Chacon <schacon@gmail.com>2012-04-18 21:08:07 +0400
committerScott Chacon <schacon@gmail.com>2012-05-02 23:11:12 +0400
commita0f1f6e261060d80e4cfa2b1a945a04f7466218e (patch)
tree85ff1ad5fc49760aad21b45c754c46cda23ab636 /db
parent32339b969b8dad4511899519b1d211031562a4d8 (diff)
initial book integration working
* rake task posts updated content to the site * creates/updates entries * indexes entries for search * displays toc and sections from db content
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20120418152515_add_chapter_title_numbers.rb11
-rw-r--r--db/schema.rb4
2 files changed, 14 insertions, 1 deletions
diff --git a/db/migrate/20120418152515_add_chapter_title_numbers.rb b/db/migrate/20120418152515_add_chapter_title_numbers.rb
new file mode 100644
index 00000000..2e0a2dae
--- /dev/null
+++ b/db/migrate/20120418152515_add_chapter_title_numbers.rb
@@ -0,0 +1,11 @@
+class AddChapterTitleNumbers < ActiveRecord::Migration
+ def up
+ add_column :chapters, :number, :integer
+ add_column :sections, :number, :integer
+ end
+
+ def down
+ remove_column :chapters, :number
+ remove_column :sections, :number
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index cf55e750..6b30943b 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 => 20120417224143) do
+ActiveRecord::Schema.define(:version => 20120418152515) do
create_table "books", :force => true do |t|
t.string "code"
@@ -26,6 +26,7 @@ ActiveRecord::Schema.define(:version => 20120417224143) do
t.integer "book_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
+ t.integer "number"
end
add_index "chapters", ["book_id"], :name => "index_chapters_on_book_id"
@@ -74,6 +75,7 @@ ActiveRecord::Schema.define(:version => 20120417224143) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "source_url"
+ t.integer "number"
end
add_index "sections", ["chapter_id"], :name => "index_sections_on_chapter_id"