schema.rb 7.59 KB
Newer Older
echarp's avatar
echarp committed
1
2
3
4
# 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.
#
echarp's avatar
echarp committed
5
6
7
8
9
# This file is the source Rails uses to define your schema when running `rails
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
echarp's avatar
echarp committed
10
11
12
#
# It's strongly recommended that you check this file into your version control system.

echarp's avatar
echarp committed
13
ActiveRecord::Schema.define(version: 2019_11_08_220522) do
14

15
  create_table "active_admin_comments", force: :cascade do |t|
echarp's avatar
echarp committed
16
17
18
19
20
21
    t.string "namespace"
    t.text "body"
    t.string "resource_id", null: false
    t.string "resource_type", null: false
    t.integer "author_id"
    t.string "author_type"
22
23
    t.datetime "created_at"
    t.datetime "updated_at"
echarp's avatar
echarp committed
24
25
26
    t.index ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id"
    t.index ["namespace"], name: "index_active_admin_comments_on_namespace"
    t.index ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id"
27
28
  end

29
  create_table "admin_users", force: :cascade do |t|
echarp's avatar
echarp committed
30
31
32
    t.string "email", default: "", null: false
    t.string "encrypted_password", default: "", null: false
    t.string "reset_password_token"
33
34
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
echarp's avatar
echarp committed
35
    t.integer "sign_in_count", default: 0, null: false
36
37
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
echarp's avatar
echarp committed
38
39
    t.string "current_sign_in_ip"
    t.string "last_sign_in_ip"
40
41
    t.datetime "created_at"
    t.datetime "updated_at"
echarp's avatar
echarp committed
42
43
    t.index ["email"], name: "index_admin_users_on_email", unique: true
    t.index ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true
44
45
  end

46
  create_table "cities", force: :cascade do |t|
echarp's avatar
echarp committed
47
48
    t.string "name", limit: 255, default: "", null: false
    t.string "majname", limit: 255, default: "", null: false
49
    t.integer "postalcode", limit: 4
echarp's avatar
echarp committed
50
    t.integer "inseecode", limit: 4
51
    t.integer "regioncode", limit: 4
echarp's avatar
echarp committed
52
53
54
    t.float "latitude", limit: 24
    t.float "longitude", limit: 24
    t.index ["name"], name: "cities_name"
echarp's avatar
echarp committed
55
56
  end

57
  create_table "events", force: :cascade do |t|
echarp's avatar
echarp committed
58
59
60
61
62
63
64
65
    t.string "title", limit: 255, default: "", null: false
    t.text "description", limit: 65535, null: false
    t.datetime "start_time", null: false
    t.datetime "end_time", null: false
    t.string "city", limit: 255, default: ""
    t.integer "region_id", limit: 4, default: 0, null: false
    t.integer "locality", limit: 4, default: 0, null: false
    t.string "url", limit: 255, default: ""
66
    t.string "contact", limit: 255, default: ""
echarp's avatar
echarp committed
67
68
    t.string "submitter", limit: 255, default: "", null: false
    t.integer "moderated", limit: 4, default: 0, null: false
69
    t.text "tags", limit: 255, default: ""
echarp's avatar
echarp committed
70
    t.string "secret", limit: 255, default: "", null: false
echarp's avatar
echarp committed
71
72
    t.datetime "decision_time"
    t.datetime "submission_time"
echarp's avatar
echarp committed
73
74
75
76
77
78
79
80
81
82
83
84
85
    t.string "moderator_mail_id", limit: 32
    t.string "submitter_mail_id", limit: 32
    t.text "address", limit: 65535
    t.float "latitude", limit: 24
    t.float "longitude", limit: 24
    t.integer "lock_version", limit: 4, default: 0, null: false
    t.string "place_name", limit: 255
    t.integer "count", default: 1
    t.integer "repeat", default: 0
    t.text "rule"
    t.integer "event_id"
    t.index ["event_id"], name: "index_events_on_event_id"
    t.index ["start_time", "end_time"], name: "events_date"
echarp's avatar
echarp committed
86
87
  end

88
  create_table "kinds", force: :cascade do |t|
echarp's avatar
echarp committed
89
90
    t.string "name", null: false
    t.string "icon"
echarp's avatar
echarp committed
91
92
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
93
94
  end

95
  create_table "notes", force: :cascade do |t|
echarp's avatar
echarp committed
96
97
98
99
    t.text "contents", limit: 65535, null: false
    t.datetime "date", null: false
    t.integer "event_id", limit: 4
    t.integer "author_id", limit: 4
echarp's avatar
echarp committed
100
101
  end

echarp's avatar
echarp committed
102
  create_table "orgas", force: :cascade do |t|
echarp's avatar
echarp committed
103
104
105
106
107
108
109
110
111
112
    t.integer "region_id", limit: 4, default: 0, null: false
    t.string "department", limit: 4, default: "0", null: false
    t.string "name", limit: 255, default: "", null: false
    t.string "url", limit: 255, default: "", null: false
    t.string "city", limit: 255, default: ""
    t.integer "kind_id", limit: 4
    t.string "feed", limit: 255
    t.string "contact", limit: 255
    t.string "submitter", limit: 255
    t.boolean "moderated", limit: 1, default: false
113
114
    t.datetime "submission_time"
    t.datetime "decision_time"
echarp's avatar
echarp committed
115
116
117
118
    t.string "secret", limit: 255
    t.boolean "deleted", limit: 1, default: false, null: false
    t.boolean "active", default: true, null: false
    t.text "description"
119
120
    t.datetime "created_at"
    t.datetime "updated_at"
echarp's avatar
echarp committed
121
    t.text "tag"
122
    t.text "tags", default: ""
echarp's avatar
echarp committed
123
124
125
126
127
128
129
    t.text "diaspora"
    t.text "object_changes"
    t.text "place_name"
    t.text "address"
    t.float "latitude"
    t.float "longitude"
    t.index ["kind_id"], name: "index_orgas_on_kind_id"
echarp's avatar
echarp committed
130
131
  end

132
  create_table "regions", force: :cascade do |t|
echarp's avatar
echarp committed
133
    t.string "name", limit: 255, default: "", null: false
134
    t.integer "region_id"
echarp's avatar
echarp committed
135
136
137
    t.string "code"
    t.string "url"
    t.index ["region_id"], name: "index_regions_on_region_id"
138
139
  end

140
  create_table "taggings", force: :cascade do |t|
echarp's avatar
echarp committed
141
142
143
144
145
146
    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
147
    t.datetime "created_at"
echarp's avatar
echarp committed
148
149
150
151
152
153
154
155
    t.index ["context"], name: "index_taggings_on_context"
    t.index ["tag_id"], name: "index_taggings_on_tag_id"
    t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
    t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy"
    t.index ["taggable_id"], name: "index_taggings_on_taggable_id"
    t.index ["taggable_type"], name: "index_taggings_on_taggable_type"
    t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type"
    t.index ["tagger_id"], name: "index_taggings_on_tagger_id"
156
157
158
  end

  create_table "tags", force: :cascade do |t|
echarp's avatar
echarp committed
159
    t.string "name"
160
    t.integer "taggings_count", default: 0
161
162
  end

163
  create_table "translations", force: :cascade do |t|
echarp's avatar
echarp committed
164
165
166
167
168
    t.string "locale", limit: 255
    t.string "key", limit: 255
    t.text "value", limit: 65535
    t.text "interpolations", limit: 65535
    t.boolean "is_proc", limit: 1, default: false
169
170
  end

171
  create_table "users", force: :cascade do |t|
echarp's avatar
echarp committed
172
173
174
175
176
    t.string "login", limit: 255, default: "", null: false
    t.string "password", limit: 255, default: "", null: false
    t.string "email", limit: 255, default: "", null: false
    t.string "lastname", limit: 255, default: "", null: false
    t.string "firstname", limit: 255, default: "", null: false
177
178
    t.string "reset_password_token"
    t.datetime "reset_password_sent_at"
179
    t.datetime "remember_created_at"
180
181
182
183
184
    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"
echarp's avatar
echarp committed
185
  end
186

187
  create_table "versions", force: :cascade do |t|
echarp's avatar
echarp committed
188
189
190
191
192
    t.string "item_type", null: false
    t.integer "item_id", null: false
    t.string "event", null: false
    t.string "whodunnit"
    t.text "object"
193
    t.datetime "created_at"
echarp's avatar
echarp committed
194
195
    t.text "object_changes", limit: 1073741823
    t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
196
197
  end

echarp's avatar
echarp committed
198
end