From 167b9b81440017f5253efda4bb6566d12f0eedc8 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 24 Aug 2017 14:35:21 +0200 Subject: Enable caching of schema.rb This is a lesser known Rails feature that removes the need for querying various internal tables for schema details (e.g. column types) every time Rails boots up. This feature is described in http://iempire.ru/2016/12/13/schema-cache/ and was brought to our attention by @stanhu. Since the schema cache is specific to the database we only enable this on PostgreSQL. --- db/schema.rb | 8 ++++---- db/schema_cache.dump | Bin 0 -> 93876 bytes 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 db/schema_cache.dump (limited to 'db') diff --git a/db/schema.rb b/db/schema.rb index cd488630237..13c741bb8dd 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: 20170820100558) do +ActiveRecord::Schema.define(version: 20170824162758) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -34,7 +34,7 @@ ActiveRecord::Schema.define(version: 20170820100558) do t.string "logo" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.text "description_html", null: false + t.text "description_html" t.integer "cached_markdown_version" end @@ -279,8 +279,8 @@ ActiveRecord::Schema.define(version: 20170820100558) do t.string "encrypted_value_salt" t.string "encrypted_value_iv" t.integer "pipeline_schedule_id", null: false - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "ci_pipeline_schedule_variables", ["pipeline_schedule_id", "key"], name: "index_ci_pipeline_schedule_variables_on_schedule_id_and_key", unique: true, using: :btree diff --git a/db/schema_cache.dump b/db/schema_cache.dump new file mode 100644 index 00000000000..197014c1471 Binary files /dev/null and b/db/schema_cache.dump differ -- cgit v1.2.1