tab/db/schema.rb

94 lines
3.9 KiB
Ruby
Raw Normal View History

2015-09-08 11:44:07 +02:00
# 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.
2018-06-20 18:02:33 +02:00
ActiveRecord::Schema.define(version: 2017_01_23_151219) do
2015-09-08 11:44:07 +02:00
create_table "clients", force: :cascade do |t|
2018-06-20 18:02:33 +02:00
t.string "name", null: false
t.string "key", null: false
2015-09-08 11:44:07 +02:00
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
2018-06-20 18:02:33 +02:00
t.index ["key"], name: "index_clients_on_key"
t.index ["name"], name: "index_clients_on_name"
2015-09-08 11:44:07 +02:00
end
2017-01-23 16:59:04 +01:00
create_table "clients_roles", id: false, force: :cascade do |t|
t.integer "client_id"
t.integer "role_id"
2018-06-20 18:02:33 +02:00
t.index ["client_id", "role_id"], name: "index_clients_roles_on_client_id_and_role_id"
t.index ["client_id"], name: "index_clients_roles_on_client_id"
t.index ["role_id"], name: "index_clients_roles_on_role_id"
2017-01-23 16:59:04 +01:00
end
2017-01-09 16:22:58 +01:00
create_table "notifications", force: :cascade do |t|
2018-06-20 18:02:33 +02:00
t.integer "user_id", null: false
t.string "message"
t.boolean "read", default: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["user_id"], name: "index_notifications_on_user_id"
2017-01-09 16:22:58 +01:00
end
2017-01-09 15:46:43 +01:00
create_table "requests", force: :cascade do |t|
2018-06-20 18:02:33 +02:00
t.integer "debtor_id", null: false
t.integer "creditor_id", null: false
t.string "issuer_type", null: false
t.integer "issuer_id", null: false
t.integer "amount", default: 0, null: false
t.string "message"
t.integer "status", default: 0
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["creditor_id"], name: "index_requests_on_creditor_id"
t.index ["debtor_id"], name: "index_requests_on_debtor_id"
t.index ["issuer_type", "issuer_id"], name: "index_requests_on_issuer_type_and_issuer_id"
2017-01-09 15:46:43 +01:00
end
2017-01-23 16:59:04 +01:00
create_table "roles", force: :cascade do |t|
2018-06-20 18:02:33 +02:00
t.string "name"
t.string "resource_type"
t.integer "resource_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id"
t.index ["name"], name: "index_roles_on_name"
t.index ["resource_type", "resource_id"], name: "index_roles_on_resource_type_and_resource_id"
2017-01-23 16:59:04 +01:00
end
2015-09-08 11:44:07 +02:00
create_table "transactions", force: :cascade do |t|
2018-06-20 18:02:33 +02:00
t.integer "debtor_id", null: false
t.integer "creditor_id", null: false
t.string "issuer_type", null: false
t.integer "issuer_id", null: false
t.integer "amount", default: 0, null: false
t.string "message"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "id_at_client"
t.index ["creditor_id"], name: "index_transactions_on_creditor_id"
t.index ["debtor_id"], name: "index_transactions_on_debtor_id"
t.index ["issuer_id", "id_at_client"], name: "index_transactions_on_issuer_id_and_id_at_client"
t.index ["issuer_type", "issuer_id"], name: "index_transactions_on_issuer_type_and_issuer_id"
2015-09-08 11:44:07 +02:00
end
create_table "users", force: :cascade do |t|
2018-06-20 18:02:33 +02:00
t.string "name"
t.integer "balance", default: 0, null: false
t.boolean "penning", default: false, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["balance"], name: "index_users_on_balance"
t.index ["name"], name: "index_users_on_name"
2015-09-08 11:44:07 +02:00
end
end