1 # This file is auto-generated from the current state of the database. Instead
2 # of editing this file, please use the migrations feature of Active Record to
3 # incrementally modify your database, and then regenerate this schema definition.
5 # This file is the source Rails uses to define your schema when running `bin/rails
6 # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7 # be faster and is potentially less error prone than running all of your
8 # migrations from scratch. Old migrations may fail to apply correctly if those
9 # migrations use external dependencies or application code.
11 # It's strongly recommended that you check this file into your version control system.
13 ActiveRecord::Schema.define(version: 2018_02_28_115911) do
15 create_table "auths", force: :cascade do |t|
16 t.string "one_touch_hash"
17 t.integer "message_id"
18 t.datetime "created_at"
19 t.datetime "updated_at"
22 create_table "communities", force: :cascade do |t|
25 t.datetime "created_at"
26 t.datetime "updated_at"
29 create_table "community_messages", force: :cascade do |t|
30 t.integer "community_id"
31 t.integer "message_id"
32 t.datetime "created_at"
33 t.datetime "updated_at"
36 create_table "ev_types", force: :cascade do |t|
38 t.datetime "created_at"
39 t.datetime "updated_at"
42 create_table "events", force: :cascade do |t|
43 t.integer "participant_id"
44 t.integer "message_id"
45 t.integer "ev_type_id"
46 t.datetime "created_at"
47 t.datetime "updated_at"
48 t.integer "lock_version", default: 0
49 t.index ["message_id"], name: "index_events_on_message_id"
50 t.index ["participant_id"], name: "index_events_on_participant_id"
53 create_table "identities", force: :cascade do |t|
54 t.integer "participant_id"
57 t.datetime "created_at"
58 t.datetime "updated_at"
61 create_table "membership_messages", force: :cascade do |t|
62 t.integer "membership_id"
63 t.integer "message_id"
64 t.datetime "created_at"
65 t.datetime "updated_at"
66 t.integer "lock_version", default: 0
67 t.index ["message_id"], name: "index_membership_messages_on_message_id"
70 create_table "memberships", force: :cascade do |t|
71 t.integer "participant_id"
72 t.integer "community_id"
73 t.datetime "created_at"
74 t.datetime "updated_at"
77 create_table "messages", force: :cascade do |t|
78 t.string "content_type"
81 t.integer "ressource_id"
82 t.datetime "created_at"
83 t.datetime "updated_at"
84 t.boolean "removed", default: false
87 create_table "organizations", force: :cascade do |t|
91 t.datetime "created_at"
92 t.datetime "updated_at"
95 create_table "participants", force: :cascade do |t|
100 t.integer "organization_id"
102 t.boolean "anonymous", default: false, null: false
103 t.datetime "created_at"
104 t.datetime "updated_at"
105 t.boolean "community_selfrouting", default: false
106 t.boolean "events_", default: true
110 create_table "ressources", force: :cascade do |t|
113 t.boolean "postroute", default: false
114 t.datetime "created_at"
115 t.datetime "updated_at"
116 t.boolean "events", default: true
119 create_table "sessions", force: :cascade do |t|
120 t.string "session_id", null: false
122 t.datetime "created_at"
123 t.datetime "updated_at"
124 t.index ["session_id"], name: "index_sessions_on_session_id"
125 t.index ["updated_at"], name: "index_sessions_on_updated_at"
128 create_table "subparticipants", force: :cascade do |t|
129 t.integer "participant_id"
130 t.integer "parent_id"
132 t.datetime "created_at"
133 t.datetime "updated_at"