# 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: 20170126074122) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "batch_line_items", force: :cascade do |t| t.integer "batch_id" t.string "serial_no", null: false t.string "wristband_code", null: false t.string "manufacture_uid", null: false t.string "card_type", default: "child" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["batch_id"], name: "index_batch_line_items_on_batch_id", using: :btree end create_table "batches", force: :cascade do |t| t.datetime "date", null: false t.integer "user_id" t.string "order_ref", null: false t.boolean "batch_start" t.boolean "batch_end" t.string "created_by", null: false t.integer "qty_processing", null: false t.integer "qty_success", null: false t.integer "qty_fail", null: false t.datetime "batch_start_time" t.datetime "batch_end_time" t.integer "export_count" t.string "remark" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "adult_or_child", default: "CHILD" t.index ["user_id"], name: "index_batches_on_user_id", using: :btree end create_table "lookups", force: :cascade do |t| t.string "name", null: false t.integer "max_value" t.string "prefix" t.integer "max_length" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "members", force: :cascade do |t| t.integer "user_id" 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.inet "current_sign_in_ip" t.inet "last_sign_in_ip" t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" t.string "unconfirmed_email" t.integer "failed_attempts", default: 0, null: false t.string "unlock_token" t.datetime "locked_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "uid" t.string "session_token" t.index ["confirmation_token"], name: "index_members_on_confirmation_token", unique: true, using: :btree t.index ["email"], name: "index_members_on_email", unique: true, using: :btree t.index ["reset_password_token"], name: "index_members_on_reset_password_token", unique: true, using: :btree t.index ["uid"], name: "index_members_on_uid", unique: true, using: :btree t.index ["unlock_token"], name: "index_members_on_unlock_token", unique: true, using: :btree t.index ["user_id"], name: "index_members_on_user_id", using: :btree end create_table "users", force: :cascade do |t| t.string "name", null: false t.string "nrc" t.string "email" t.boolean "is_active", default: false t.string "phone" t.string "address" t.string "secrect_key" t.datetime "created_at", null: false t.datetime "updated_at", null: false end end