aboutsummaryrefslogtreecommitdiffstats
path: root/db/schema.rb
diff options
context:
space:
mode:
authorXinhui2017-08-17 15:47:55 +0200
committerXinhui2017-08-17 16:03:13 +0200
commit24862b2b1baa94c80fd7206bfe2244019604dbf5 (patch)
tree5f6905f8b76287f061f7ba98258d0ad43fa11bf9 /db/schema.rb
parent27d0fc5da357c6ba7b7b3288399c7934c30265f2 (diff)
downloadchouette-core-24862b2b1baa94c80fd7206bfe2244019604dbf5.tar.bz2
Model ApiKey add belongs_to organisation
Diffstat (limited to 'db/schema.rb')
-rw-r--r--db/schema.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/db/schema.rb b/db/schema.rb
index 8816bab2f..e9344e56c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20170816104020) do
+ActiveRecord::Schema.define(version: 20170817122914) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -72,13 +72,16 @@ ActiveRecord::Schema.define(version: 20170816104020) do
add_index "access_points", ["objectid"], name: "access_points_objectid_key", unique: true, using: :btree
create_table "api_keys", id: :bigserial, force: :cascade do |t|
- t.integer "referential_id", limit: 8
+ t.integer "referential_id", limit: 8
t.string "token"
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
+ t.integer "organisation_id"
end
+ add_index "api_keys", ["organisation_id"], name: "index_api_keys_on_organisation_id", using: :btree
+
create_table "calendars", id: :bigserial, force: :cascade do |t|
t.string "name"
t.string "short_name"
@@ -854,6 +857,7 @@ ActiveRecord::Schema.define(version: 20170816104020) do
add_index "workbenches", ["stop_area_referential_id"], name: "index_workbenches_on_stop_area_referential_id", using: :btree
add_foreign_key "access_links", "access_points", name: "aclk_acpt_fkey"
+ add_foreign_key "api_keys", "organisations"
add_foreign_key "group_of_lines_lines", "group_of_lines", name: "groupofline_group_fkey", on_delete: :cascade
add_foreign_key "journey_frequencies", "timebands", on_delete: :nullify
add_foreign_key "journey_frequencies", "vehicle_journeys", on_delete: :nullify