2012-05-28 10:41:33 +02:00
|
|
|
# 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.
|
2009-01-06 11:49:19 +01:00
|
|
|
#
|
2012-05-28 10:41:33 +02:00
|
|
|
# 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
|
2009-01-06 11:49:19 +01:00
|
|
|
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
|
|
#
|
2014-02-20 15:04:53 +01:00
|
|
|
# It's strongly recommended that you check this file into your version control system.
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-05-21 21:24:03 +02:00
|
|
|
ActiveRecord::Schema.define(version: 20140521142651) do
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "article_categories", force: true do |t|
|
|
|
|
t.string "name", default: "", null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
t.string "description"
|
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "article_categories", ["name"], name: "index_article_categories_on_name", unique: true, using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "article_prices", force: true do |t|
|
2009-01-29 01:57:51 +01:00
|
|
|
t.integer "article_id"
|
2014-06-23 17:50:51 +02:00
|
|
|
t.decimal "price", precision: 8, scale: 2, default: 0, null: false
|
|
|
|
t.decimal "tax", precision: 8, scale: 2, default: 0, null: false
|
|
|
|
t.decimal "deposit", precision: 8, scale: 2, default: 0, null: false
|
2009-01-29 01:57:51 +01:00
|
|
|
t.integer "unit_quantity"
|
|
|
|
t.datetime "created_at"
|
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "article_prices", ["article_id"], name: "index_article_prices_on_article_id", using: :btree
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "articles", force: true do |t|
|
|
|
|
t.string "name", default: "", null: false
|
|
|
|
t.integer "supplier_id", default: 0, null: false
|
|
|
|
t.integer "article_category_id", default: 0, null: false
|
|
|
|
t.string "unit", default: "", null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
t.string "note"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.boolean "availability", default: true, null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
t.string "manufacturer"
|
|
|
|
t.string "origin"
|
|
|
|
t.datetime "shared_updated_on"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.decimal "price", precision: 8, scale: 2
|
2009-01-06 11:49:19 +01:00
|
|
|
t.float "tax"
|
2014-06-23 17:50:51 +02:00
|
|
|
t.decimal "deposit", precision: 8, scale: 2, default: 0
|
2014-02-20 15:04:53 +01:00
|
|
|
t.integer "unit_quantity", default: 1, null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
t.string "order_number"
|
|
|
|
t.datetime "created_at"
|
|
|
|
t.datetime "updated_at"
|
2009-01-20 19:37:15 +01:00
|
|
|
t.datetime "deleted_at"
|
2009-02-06 16:26:35 +01:00
|
|
|
t.string "type"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.integer "quantity", default: 0
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "articles", ["article_category_id"], name: "index_articles_on_article_category_id", using: :btree
|
|
|
|
add_index "articles", ["name", "supplier_id"], name: "index_articles_on_name_and_supplier_id", using: :btree
|
|
|
|
add_index "articles", ["supplier_id"], name: "index_articles_on_supplier_id", using: :btree
|
|
|
|
add_index "articles", ["type"], name: "index_articles_on_type", using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "assignments", force: true do |t|
|
|
|
|
t.integer "user_id", default: 0, null: false
|
|
|
|
t.integer "task_id", default: 0, null: false
|
|
|
|
t.boolean "accepted", default: false
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "assignments", ["user_id", "task_id"], name: "index_assignments_on_user_id_and_task_id", unique: true, using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "deliveries", force: true do |t|
|
2009-01-13 19:01:56 +01:00
|
|
|
t.integer "supplier_id"
|
|
|
|
t.date "delivered_on"
|
|
|
|
t.datetime "created_at"
|
2009-08-12 18:41:25 +02:00
|
|
|
t.text "note"
|
2009-01-13 19:01:56 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "deliveries", ["supplier_id"], name: "index_deliveries_on_supplier_id", using: :btree
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "financial_transactions", force: true do |t|
|
2014-06-23 17:50:51 +02:00
|
|
|
t.integer "ordergroup_id", default: 0, null: false
|
|
|
|
t.decimal "amount", precision: 8, scale: 2, default: 0, null: false
|
|
|
|
t.text "note", null: false
|
|
|
|
t.integer "user_id", default: 0, null: false
|
|
|
|
t.datetime "created_on", null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "financial_transactions", ["ordergroup_id"], name: "index_financial_transactions_on_ordergroup_id", using: :btree
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "group_order_article_quantities", force: true do |t|
|
|
|
|
t.integer "group_order_article_id", default: 0, null: false
|
|
|
|
t.integer "quantity", default: 0
|
|
|
|
t.integer "tolerance", default: 0
|
|
|
|
t.datetime "created_on", null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "group_order_article_quantities", ["group_order_article_id"], name: "index_group_order_article_quantities_on_group_order_article_id", using: :btree
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "group_order_articles", force: true do |t|
|
|
|
|
t.integer "group_order_id", default: 0, null: false
|
|
|
|
t.integer "order_article_id", default: 0, null: false
|
|
|
|
t.integer "quantity", default: 0, null: false
|
|
|
|
t.integer "tolerance", default: 0, null: false
|
|
|
|
t.datetime "updated_on", null: false
|
|
|
|
t.decimal "result", precision: 8, scale: 3
|
|
|
|
t.decimal "result_computed", precision: 8, scale: 3
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "group_order_articles", ["group_order_id", "order_article_id"], name: "goa_index", unique: true, using: :btree
|
|
|
|
add_index "group_order_articles", ["group_order_id"], name: "index_group_order_articles_on_group_order_id", using: :btree
|
|
|
|
add_index "group_order_articles", ["order_article_id"], name: "index_group_order_articles_on_order_article_id", using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "group_orders", force: true do |t|
|
2014-06-23 17:50:51 +02:00
|
|
|
t.integer "ordergroup_id", default: 0, null: false
|
|
|
|
t.integer "order_id", default: 0, null: false
|
|
|
|
t.decimal "price", precision: 8, scale: 2, default: 0, null: false
|
|
|
|
t.integer "lock_version", default: 0, null: false
|
|
|
|
t.datetime "updated_on", null: false
|
2009-01-29 21:28:22 +01:00
|
|
|
t.integer "updated_by_user_id"
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "group_orders", ["order_id"], name: "index_group_orders_on_order_id", using: :btree
|
|
|
|
add_index "group_orders", ["ordergroup_id", "order_id"], name: "index_group_orders_on_ordergroup_id_and_order_id", unique: true, using: :btree
|
|
|
|
add_index "group_orders", ["ordergroup_id"], name: "index_group_orders_on_ordergroup_id", using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "groups", force: true do |t|
|
|
|
|
t.string "type", default: "", null: false
|
|
|
|
t.string "name", default: "", null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
t.string "description"
|
2014-06-23 17:50:51 +02:00
|
|
|
t.decimal "account_balance", precision: 8, scale: 2, default: 0, null: false
|
2014-02-20 15:04:53 +01:00
|
|
|
t.datetime "created_on", null: false
|
|
|
|
t.boolean "role_admin", default: false, null: false
|
|
|
|
t.boolean "role_suppliers", default: false, null: false
|
|
|
|
t.boolean "role_article_meta", default: false, null: false
|
|
|
|
t.boolean "role_finance", default: false, null: false
|
|
|
|
t.boolean "role_orders", default: false, null: false
|
2009-01-29 01:57:51 +01:00
|
|
|
t.datetime "deleted_at"
|
2009-02-02 16:35:43 +01:00
|
|
|
t.string "contact_person"
|
|
|
|
t.string "contact_phone"
|
|
|
|
t.string "contact_address"
|
2009-08-12 18:41:25 +02:00
|
|
|
t.text "stats"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.integer "next_weekly_tasks_number", default: 8
|
|
|
|
t.boolean "ignore_apple_restriction", default: false
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "groups", ["name"], name: "index_groups_on_name", unique: true, using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "invites", force: true do |t|
|
|
|
|
t.string "token", default: "", null: false
|
|
|
|
t.datetime "expires_at", null: false
|
|
|
|
t.integer "group_id", default: 0, null: false
|
|
|
|
t.integer "user_id", default: 0, null: false
|
|
|
|
t.string "email", default: "", null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "invites", ["token"], name: "index_invites_on_token", using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "invoices", force: true do |t|
|
2009-01-08 16:33:27 +01:00
|
|
|
t.integer "supplier_id"
|
|
|
|
t.integer "delivery_id"
|
2009-08-12 18:41:25 +02:00
|
|
|
t.integer "order_id"
|
2009-01-08 16:33:27 +01:00
|
|
|
t.string "number"
|
|
|
|
t.date "date"
|
|
|
|
t.date "paid_on"
|
|
|
|
t.text "note"
|
2014-06-23 17:50:51 +02:00
|
|
|
t.decimal "amount", precision: 8, scale: 2, default: 0, null: false
|
|
|
|
t.decimal "deposit", precision: 8, scale: 2, default: 0, null: false
|
|
|
|
t.decimal "deposit_credit", precision: 8, scale: 2, default: 0, null: false
|
2009-08-12 18:41:25 +02:00
|
|
|
t.datetime "created_at"
|
|
|
|
t.datetime "updated_at"
|
2009-01-08 16:33:27 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "invoices", ["delivery_id"], name: "index_invoices_on_delivery_id", using: :btree
|
|
|
|
add_index "invoices", ["supplier_id"], name: "index_invoices_on_supplier_id", using: :btree
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "memberships", force: true do |t|
|
|
|
|
t.integer "group_id", default: 0, null: false
|
|
|
|
t.integer "user_id", default: 0, null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "memberships", ["user_id", "group_id"], name: "index_memberships_on_user_id_and_group_id", unique: true, using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "messages", force: true do |t|
|
2009-01-06 11:49:19 +01:00
|
|
|
t.integer "sender_id"
|
2009-01-16 02:17:49 +01:00
|
|
|
t.text "recipients_ids"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.string "subject", null: false
|
2009-01-15 18:26:37 +01:00
|
|
|
t.text "body"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.integer "email_state", default: 0, null: false
|
|
|
|
t.boolean "private", default: false
|
2009-01-15 18:26:37 +01:00
|
|
|
t.datetime "created_at"
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "order_articles", force: true do |t|
|
|
|
|
t.integer "order_id", default: 0, null: false
|
|
|
|
t.integer "article_id", default: 0, null: false
|
|
|
|
t.integer "quantity", default: 0, null: false
|
|
|
|
t.integer "tolerance", default: 0, null: false
|
|
|
|
t.integer "units_to_order", default: 0, null: false
|
|
|
|
t.integer "lock_version", default: 0, null: false
|
2009-01-29 01:57:51 +01:00
|
|
|
t.integer "article_price_id"
|
2013-11-25 13:48:54 +01:00
|
|
|
t.integer "units_billed"
|
|
|
|
t.integer "units_received"
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "order_articles", ["order_id", "article_id"], name: "index_order_articles_on_order_id_and_article_id", unique: true, using: :btree
|
|
|
|
add_index "order_articles", ["order_id"], name: "index_order_articles_on_order_id", using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "order_comments", force: true do |t|
|
2009-01-29 01:57:51 +01:00
|
|
|
t.integer "order_id"
|
|
|
|
t.integer "user_id"
|
|
|
|
t.text "text"
|
|
|
|
t.datetime "created_at"
|
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "order_comments", ["order_id"], name: "index_order_comments_on_order_id", using: :btree
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "orders", force: true do |t|
|
2009-01-29 01:57:51 +01:00
|
|
|
t.integer "supplier_id"
|
|
|
|
t.text "note"
|
|
|
|
t.datetime "starts"
|
2009-01-06 11:49:19 +01:00
|
|
|
t.datetime "ends"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.string "state", default: "open"
|
|
|
|
t.integer "lock_version", default: 0, null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
t.integer "updated_by_user_id"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.decimal "foodcoop_result", precision: 8, scale: 2
|
2012-11-12 14:24:49 +01:00
|
|
|
t.integer "created_by_user_id"
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "orders", ["state"], name: "index_orders_on_state", using: :btree
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "page_versions", force: true do |t|
|
2009-08-12 18:41:25 +02:00
|
|
|
t.integer "page_id"
|
|
|
|
t.integer "lock_version"
|
|
|
|
t.text "body"
|
|
|
|
t.integer "updated_by"
|
|
|
|
t.integer "redirect"
|
|
|
|
t.integer "parent_id"
|
|
|
|
t.datetime "updated_at"
|
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "page_versions", ["page_id"], name: "index_page_versions_on_page_id", using: :btree
|
2009-08-12 18:41:25 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "pages", force: true do |t|
|
2009-08-12 18:41:25 +02:00
|
|
|
t.string "title"
|
|
|
|
t.text "body"
|
|
|
|
t.string "permalink"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.integer "lock_version", default: 0
|
2009-08-12 18:41:25 +02:00
|
|
|
t.integer "updated_by"
|
|
|
|
t.integer "redirect"
|
|
|
|
t.integer "parent_id"
|
|
|
|
t.datetime "created_at"
|
|
|
|
t.datetime "updated_at"
|
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "pages", ["permalink"], name: "index_pages_on_permalink", using: :btree
|
|
|
|
add_index "pages", ["title"], name: "index_pages_on_title", using: :btree
|
2009-08-15 17:36:13 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "periodic_task_groups", force: true do |t|
|
2012-11-28 10:13:54 +01:00
|
|
|
t.date "next_task_date"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
2012-11-28 10:13:54 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "settings", force: true do |t|
|
|
|
|
t.string "var", null: false
|
2013-06-06 03:40:15 +02:00
|
|
|
t.text "value"
|
|
|
|
t.integer "thing_id"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.string "thing_type", limit: 30
|
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
2013-06-06 03:40:15 +02:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "settings", ["thing_type", "thing_id", "var"], name: "index_settings_on_thing_type_and_thing_id_and_var", unique: true, using: :btree
|
2013-06-06 03:40:15 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "stock_changes", force: true do |t|
|
2009-01-16 02:17:49 +01:00
|
|
|
t.integer "delivery_id"
|
|
|
|
t.integer "order_id"
|
2009-02-06 16:26:35 +01:00
|
|
|
t.integer "stock_article_id"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.integer "quantity", default: 0
|
2009-01-16 02:17:49 +01:00
|
|
|
t.datetime "created_at"
|
2009-03-17 19:43:41 +01:00
|
|
|
t.integer "stock_taking_id"
|
2009-01-16 02:17:49 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "stock_changes", ["delivery_id"], name: "index_stock_changes_on_delivery_id", using: :btree
|
|
|
|
add_index "stock_changes", ["stock_article_id"], name: "index_stock_changes_on_stock_article_id", using: :btree
|
|
|
|
add_index "stock_changes", ["stock_taking_id"], name: "index_stock_changes_on_stock_taking_id", using: :btree
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "stock_takings", force: true do |t|
|
2009-02-12 18:32:20 +01:00
|
|
|
t.date "date"
|
|
|
|
t.text "note"
|
|
|
|
t.datetime "created_at"
|
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "suppliers", force: true do |t|
|
|
|
|
t.string "name", default: "", null: false
|
|
|
|
t.string "address", default: "", null: false
|
|
|
|
t.string "phone", default: "", null: false
|
2009-01-20 19:37:15 +01:00
|
|
|
t.string "phone2"
|
|
|
|
t.string "fax"
|
|
|
|
t.string "email"
|
|
|
|
t.string "url"
|
|
|
|
t.string "contact_person"
|
|
|
|
t.string "customer_number"
|
|
|
|
t.string "delivery_days"
|
|
|
|
t.string "order_howto"
|
|
|
|
t.string "note"
|
|
|
|
t.integer "shared_supplier_id"
|
|
|
|
t.string "min_order_quantity"
|
|
|
|
t.datetime "deleted_at"
|
2014-05-21 21:24:03 +02:00
|
|
|
t.string "shared_sync_method"
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "suppliers", ["name"], name: "index_suppliers_on_name", unique: true, using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "tasks", force: true do |t|
|
|
|
|
t.string "name", default: "", null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
t.string "description"
|
|
|
|
t.date "due_date"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.boolean "done", default: false
|
2009-01-15 12:14:01 +01:00
|
|
|
t.integer "workgroup_id"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.datetime "created_on", null: false
|
|
|
|
t.datetime "updated_on", null: false
|
|
|
|
t.integer "required_users", default: 1
|
|
|
|
t.integer "duration", default: 1
|
2012-11-28 10:13:54 +01:00
|
|
|
t.integer "periodic_task_group_id"
|
2009-01-06 11:49:19 +01:00
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "tasks", ["due_date"], name: "index_tasks_on_due_date", using: :btree
|
|
|
|
add_index "tasks", ["name"], name: "index_tasks_on_name", using: :btree
|
|
|
|
add_index "tasks", ["workgroup_id"], name: "index_tasks_on_workgroup_id", using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
create_table "users", force: true do |t|
|
2013-09-20 22:39:19 +02:00
|
|
|
t.string "nick"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.string "password_hash", default: "", null: false
|
|
|
|
t.string "password_salt", default: "", null: false
|
|
|
|
t.string "first_name", default: "", null: false
|
|
|
|
t.string "last_name", default: "", null: false
|
|
|
|
t.string "email", default: "", null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
t.string "phone"
|
2014-02-20 15:04:53 +01:00
|
|
|
t.datetime "created_on", null: false
|
2009-01-06 11:49:19 +01:00
|
|
|
t.string "reset_password_token"
|
|
|
|
t.datetime "reset_password_expires"
|
|
|
|
t.datetime "last_login"
|
|
|
|
end
|
|
|
|
|
2014-02-20 15:04:53 +01:00
|
|
|
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
|
|
|
|
add_index "users", ["nick"], name: "index_users_on_nick", unique: true, using: :btree
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
end
|