2013-11-14 10:54:09 +01: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-04-08 23:37:12 +02:00
|
|
|
ActiveRecord::Schema.define(version: 20180408212139) do
|
2014-08-07 22:16:05 +02:00
|
|
|
|
2015-02-15 15:50:47 +01:00
|
|
|
create_table "active_admin_comments", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
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"
|
2013-11-14 17:07:48 +01:00
|
|
|
t.datetime "created_at"
|
|
|
|
t.datetime "updated_at"
|
2017-10-21 22:12:19 +02:00
|
|
|
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"
|
2013-11-14 17:07:48 +01:00
|
|
|
end
|
|
|
|
|
2015-02-15 15:50:47 +01:00
|
|
|
create_table "admin_users", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "email", default: "", null: false
|
|
|
|
t.string "encrypted_password", default: "", null: false
|
|
|
|
t.string "reset_password_token"
|
2013-11-14 17:07:48 +01:00
|
|
|
t.datetime "reset_password_sent_at"
|
|
|
|
t.datetime "remember_created_at"
|
2017-10-21 22:12:19 +02:00
|
|
|
t.integer "sign_in_count", default: 0, null: false
|
2013-11-14 17:07:48 +01:00
|
|
|
t.datetime "current_sign_in_at"
|
|
|
|
t.datetime "last_sign_in_at"
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "current_sign_in_ip"
|
|
|
|
t.string "last_sign_in_ip"
|
2013-11-14 17:07:48 +01:00
|
|
|
t.datetime "created_at"
|
|
|
|
t.datetime "updated_at"
|
2017-10-21 22:12:19 +02:00
|
|
|
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
|
2013-11-14 17:07:48 +01:00
|
|
|
end
|
|
|
|
|
2015-02-15 15:50:47 +01:00
|
|
|
create_table "cities", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "name", limit: 255, default: "", null: false
|
|
|
|
t.string "majname", limit: 255, default: "", null: false
|
2015-03-08 23:41:52 +01:00
|
|
|
t.integer "postalcode", limit: 4
|
2017-10-21 22:12:19 +02:00
|
|
|
t.integer "inseecode", limit: 4
|
2015-03-08 23:41:52 +01:00
|
|
|
t.integer "regioncode", limit: 4
|
2017-10-21 22:12:19 +02:00
|
|
|
t.float "latitude", limit: 24
|
|
|
|
t.float "longitude", limit: 24
|
|
|
|
t.index ["name"], name: "cities_name"
|
2013-11-14 10:54:09 +01:00
|
|
|
end
|
|
|
|
|
2015-02-15 15:50:47 +01:00
|
|
|
create_table "events", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
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: ""
|
2018-04-08 23:37:12 +02:00
|
|
|
t.string "contact", limit: 255, default: ""
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "submitter", limit: 255, default: "", null: false
|
|
|
|
t.integer "moderated", limit: 4, default: 0, null: false
|
|
|
|
t.text "tags", limit: 255, default: ""
|
|
|
|
t.string "secret", limit: 255, default: "", null: false
|
2016-04-23 12:54:39 +02:00
|
|
|
t.datetime "decision_time"
|
|
|
|
t.datetime "submission_time"
|
2017-10-21 22:12:19 +02:00
|
|
|
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"
|
2013-11-14 10:54:09 +01:00
|
|
|
end
|
|
|
|
|
2015-02-28 17:28:05 +01:00
|
|
|
create_table "kinds", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "name", null: false
|
|
|
|
t.string "icon"
|
2016-04-23 12:54:39 +02:00
|
|
|
t.datetime "created_at", null: false
|
|
|
|
t.datetime "updated_at", null: false
|
2015-02-28 17:28:05 +01:00
|
|
|
end
|
|
|
|
|
2015-02-15 15:50:47 +01:00
|
|
|
create_table "notes", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
t.text "contents", limit: 65535, null: false
|
|
|
|
t.datetime "date", null: false
|
|
|
|
t.integer "event_id", limit: 4
|
|
|
|
t.integer "author_id", limit: 4
|
2013-11-14 10:54:09 +01:00
|
|
|
end
|
|
|
|
|
2015-02-15 17:10:17 +01:00
|
|
|
create_table "orgas", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
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
|
2015-02-28 17:28:05 +01:00
|
|
|
t.datetime "submission_time"
|
|
|
|
t.datetime "decision_time"
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "secret", limit: 255
|
|
|
|
t.boolean "deleted", limit: 1, default: false, null: false
|
|
|
|
t.boolean "active", default: true, null: false
|
|
|
|
t.text "description"
|
2015-12-27 00:07:30 +01:00
|
|
|
t.datetime "created_at"
|
|
|
|
t.datetime "updated_at"
|
2017-10-21 22:12:19 +02:00
|
|
|
t.text "tag"
|
|
|
|
t.text "tags", default: ""
|
|
|
|
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"
|
2015-02-15 17:10:17 +01:00
|
|
|
end
|
|
|
|
|
2015-02-15 15:50:47 +01:00
|
|
|
create_table "regions", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "name", limit: 255, default: "", null: false
|
2017-05-20 16:02:07 +02:00
|
|
|
t.integer "region_id"
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "code"
|
|
|
|
t.string "url"
|
|
|
|
t.index ["region_id"], name: "index_regions_on_region_id"
|
2015-02-15 15:50:47 +01:00
|
|
|
end
|
|
|
|
|
2016-01-07 22:20:09 +01:00
|
|
|
create_table "taggings", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
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
|
2016-01-07 22:20:09 +01:00
|
|
|
t.datetime "created_at"
|
2017-10-21 22:12:19 +02:00
|
|
|
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"
|
2016-01-07 22:20:09 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
create_table "tags", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "name"
|
2016-12-17 16:59:11 +01:00
|
|
|
t.integer "taggings_count", default: 0
|
2016-01-07 22:20:09 +01:00
|
|
|
end
|
|
|
|
|
2015-02-15 15:50:47 +01:00
|
|
|
create_table "translations", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
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
|
2014-04-04 00:51:42 +02:00
|
|
|
end
|
|
|
|
|
2015-02-15 15:50:47 +01:00
|
|
|
create_table "users", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
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
|
|
|
|
t.string "confirmation_token"
|
2016-12-17 16:59:11 +01:00
|
|
|
t.datetime "confirmed_at"
|
|
|
|
t.datetime "confirmation_sent_at"
|
|
|
|
t.datetime "remember_created_at"
|
2017-10-21 22:12:19 +02:00
|
|
|
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
|
2013-11-14 10:54:09 +01:00
|
|
|
end
|
2014-08-07 22:16:05 +02:00
|
|
|
|
2015-07-25 18:32:27 +02:00
|
|
|
create_table "versions", force: :cascade do |t|
|
2017-10-21 22:12:19 +02:00
|
|
|
t.string "item_type", null: false
|
|
|
|
t.integer "item_id", null: false
|
|
|
|
t.string "event", null: false
|
|
|
|
t.string "whodunnit"
|
|
|
|
t.text "object"
|
2015-07-25 18:32:27 +02:00
|
|
|
t.datetime "created_at"
|
2017-10-21 22:12:19 +02:00
|
|
|
t.text "object_changes", limit: 1073741823
|
|
|
|
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
2015-07-25 18:32:27 +02:00
|
|
|
end
|
|
|
|
|
2013-11-14 10:54:09 +01:00
|
|
|
end
|