Skip to content

Instantly share code, notes, and snippets.

@johnhamelink
Created February 19, 2014 14:02
Show Gist options
  • Select an option

  • Save johnhamelink/9092673 to your computer and use it in GitHub Desktop.

Select an option

Save johnhamelink/9092673 to your computer and use it in GitHub Desktop.
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# 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 that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140219110300) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
enable_extension "uuid-ossp"
enable_extension "hstore"
create_table "answers", force: true do |t|
t.integer "answersheet_id"
t.integer "question_id"
t.text "text_answers"
t.string "attachment_uid"
t.string "attachment_name"
t.string "media_type"
t.integer "status", default: 0
end
create_table "answersheets", force: true do |t|
t.integer "user_id"
t.integer "challenge_id"
t.boolean "assessed", default: false
end
add_index "answersheets", ["challenge_id"], name: "index_answersheets_on_challenge_id", using: :btree
add_index "answersheets", ["user_id"], name: "index_answersheets_on_user_id", using: :btree
create_table "badges", force: true do |t|
t.string "path"
t.string "title"
t.string "level"
t.string "description"
t.string "uid"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id"
t.boolean "published"
t.text "tags", default: [], array: true
end
add_index "badges", ["uid"], name: "index_badges_on_uid", unique: true, using: :btree
create_table "categories", force: true do |t|
t.string "name"
t.string "ancestry"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "categories", ["ancestry"], name: "index_categories_on_ancestry", using: :btree
create_table "challenges", force: true do |t|
t.string "name"
t.integer "user_id"
t.text "description"
t.integer "badge_id"
end
add_index "challenges", ["badge_id"], name: "index_challenges_on_badge_id", using: :btree
add_index "challenges", ["user_id"], name: "index_challenges_on_user_id", using: :btree
create_table "delayed_jobs", force: true do |t|
t.integer "priority", default: 0, null: false
t.integer "attempts", default: 0, null: false
t.text "handler", null: false
t.text "last_error"
t.datetime "run_at"
t.datetime "locked_at"
t.datetime "failed_at"
t.string "locked_by"
t.string "queue"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree
create_table "icon_files", force: true do |t|
t.string "char"
t.string "path"
t.integer "category_id"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "icon_files", ["category_id"], name: "index_icon_files_on_category_id", using: :btree
add_index "icon_files", ["char"], name: "index_icon_files_on_char", using: :btree
create_table "notifications", force: true do |t|
t.string "message"
t.string "url"
t.string "image"
t.integer "user_id"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "read", default: false
end
add_index "notifications", ["user_id"], name: "index_notifications_on_user_id", using: :btree
create_table "openbadges", id: :uuid, default: "uuid_generate_v4()", force: true do |t|
t.string "recipient"
t.string "image"
t.string "evidence"
t.datetime "issuedOn"
t.datetime "expires"
t.integer "badge_id"
t.hstore "verify"
t.boolean "revoked", default: false
t.boolean "baked", default: false
t.integer "user_id"
end
create_table "options", force: true do |t|
t.integer "question_id"
t.text "answer"
t.boolean "correct"
end
add_index "options", ["question_id"], name: "index_options_on_question_id", using: :btree
create_table "paths", force: true do |t|
t.string "char", limit: 128, null: false
t.integer "category_id"
t.string "path", null: false
t.string "thumb"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "paths", ["char"], name: "index_paths_on_char", using: :btree
create_table "questions", force: true do |t|
t.integer "type"
t.integer "challenge_id"
t.text "question"
t.string "media_type"
end
add_index "questions", ["challenge_id"], name: "index_questions_on_challenge_id", using: :btree
create_table "schools", force: true do |t|
t.string "name"
t.string "website"
t.string "logo_uid"
t.string "logo_name"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "shorteners", force: true do |t|
t.string "query"
t.string "redirect"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "swatches", force: true do |t|
t.string "name"
t.string "thumbnail"
t.string "colours", default: [], array: true
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "taggings", force: true do |t|
t.integer "tag_id"
t.integer "taggable_id"
t.string "taggable_type"
t.integer "tagger_id"
t.string "tagger_type"
t.string "context", limit: 128
t.datetime "created_at"
end
add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree
create_table "tags", force: true do |t|
t.string "name"
end
add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
create_table "users", force: true do |t|
t.string "name"
t.integer "level", default: 0, null: false
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "provider"
t.string "uid"
t.boolean "post_registered"
t.string "avatar_uid"
t.string "avatar_name"
t.string "yeargroup"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
add_index "users", ["yeargroup"], name: "index_users_on_yeargroup", using: :btree
create_table "widgets", force: true do |t|
t.integer "category_id", null: false
t.string "type", null: false
t.integer "x", null: false
t.integer "y", null: false
t.integer "width", null: false
t.integer "height", null: false
t.string "name"
t.string "font"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "widgets", ["category_id"], name: "index_widgets_on_category_id", using: :btree
add_index "widgets", ["name"], name: "index_widgets_on_name", using: :btree
add_index "widgets", ["type"], name: "index_widgets_on_type", using: :btree
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment