diff options
-rw-r--r-- | config/database.yml.example (renamed from config/database.yml) | 11 | ||||
-rw-r--r-- | db/schema.rb | 75 | ||||
-rwxr-xr-x | script/bootstrap | 1 |
3 files changed, 49 insertions, 38 deletions
diff --git a/config/database.yml b/config/database.yml.example index 38243b78..ef3b2b34 100644 --- a/config/database.yml +++ b/config/database.yml.example @@ -5,11 +5,18 @@ production: timeout: 5000 development: - adapter: sqlite3 - database: db/development.sqlite3 + adapter: postgresql + database: gitscm_development + host: localhost pool: 5 timeout: 5000 +# development: +# adapter: sqlite3 +# database: db/development.sqlite3 +# pool: 5 +# timeout: 5000 + test: adapter: sqlite3 database: db/test.sqlite3 diff --git a/db/schema.rb b/db/schema.rb index 8549b90f..4d62523d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,101 +9,104 @@ # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # -# It's strongly recommended to check this file into your version control system. +# It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(:version => 20121211011752) do +ActiveRecord::Schema.define(version: 20121211011752) do - create_table "books", :force => true do |t| + # These are extensions that must be enabled in order to support this database + enable_extension "plpgsql" + + create_table "books", force: true do |t| t.string "code" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "books", ["code"], :name => "index_books_on_code" + add_index "books", ["code"], name: "index_books_on_code", using: :btree - create_table "chapters", :force => true do |t| + create_table "chapters", force: true do |t| t.string "title" t.integer "book_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" t.integer "number" t.string "sha" end - add_index "chapters", ["book_id"], :name => "index_chapters_on_book_id" + add_index "chapters", ["book_id"], name: "index_chapters_on_book_id", using: :btree - create_table "doc_files", :force => true do |t| + create_table "doc_files", force: true do |t| t.string "name" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "doc_files", ["name"], :name => "index_doc_files_on_name" + add_index "doc_files", ["name"], name: "index_doc_files_on_name", using: :btree - create_table "doc_versions", :force => true do |t| + create_table "doc_versions", force: true do |t| t.integer "version_id" t.integer "doc_id" t.integer "doc_file_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "docs", :force => true do |t| + create_table "docs", force: true do |t| t.string "blob_sha" t.text "plain" t.text "html" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - add_index "docs", ["blob_sha"], :name => "index_docs_on_blob_sha" + add_index "docs", ["blob_sha"], name: "index_docs_on_blob_sha", using: :btree - create_table "downloads", :force => true do |t| + create_table "downloads", force: true do |t| t.string "url" t.string "filename" t.string "platform" t.integer "version_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" t.datetime "release_date" end - create_table "related_items", :force => true do |t| + create_table "related_items", force: true do |t| t.string "name" t.string "content_type" t.string "content_url" t.string "related_type" t.string "related_id" t.integer "score" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "sections", :force => true do |t| + create_table "sections", force: true do |t| t.string "title" t.string "slug" t.text "plain" t.text "html" t.integer "chapter_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" t.string "source_url" t.integer "number" end - add_index "sections", ["chapter_id"], :name => "index_sections_on_chapter_id" - add_index "sections", ["slug"], :name => "index_sections_on_slug" + add_index "sections", ["chapter_id"], name: "index_sections_on_chapter_id", using: :btree + add_index "sections", ["slug"], name: "index_sections_on_slug", using: :btree - create_table "versions", :force => true do |t| + create_table "versions", force: true do |t| t.string "name" t.string "commit_sha" t.string "tree_sha" t.datetime "committed" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" t.float "vorder" end - add_index "versions", ["name"], :name => "index_versions_on_name" + add_index "versions", ["name"], name: "index_versions_on_name", using: :btree end diff --git a/script/bootstrap b/script/bootstrap index 3796241e..24bc5262 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -2,4 +2,5 @@ # Set up Ruby dependencies and the local SQLite database. bundle check 2>&1 > /dev/null || bundle install --binstubs --path vendor/gems +cp config/database.yml.example config/database.yml bundle exec rake db:migrate |