From 11f1c9d4879451d01a31357b25f6875011b43ece Mon Sep 17 00:00:00 2001 From: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com> Date: Fri, 26 Mar 2021 08:09:18 -0600 Subject: [PATCH] Add a landing_page boolean to the Pages table (#13135) [deploy] - Adds default: false to landing_page column - Adds null: false to landing_page column - Adds migration file and updated schema --- db/migrate/20210325183834_add_landing_page_to_pages.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20210325183834_add_landing_page_to_pages.rb diff --git a/db/migrate/20210325183834_add_landing_page_to_pages.rb b/db/migrate/20210325183834_add_landing_page_to_pages.rb new file mode 100644 index 000000000..961a17a3e --- /dev/null +++ b/db/migrate/20210325183834_add_landing_page_to_pages.rb @@ -0,0 +1,5 @@ +class AddLandingPageToPages < ActiveRecord::Migration[6.0] + def change + add_column :pages, :landing_page, :boolean, null: false, default: false + end +end diff --git a/db/schema.rb b/db/schema.rb index fd137f8f6..68caafc0e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_03_25_040245) do +ActiveRecord::Schema.define(version: 2021_03_25_183834) do # These are extensions that must be enabled in order to support this database enable_extension "citext" @@ -828,6 +828,7 @@ ActiveRecord::Schema.define(version: 2021_03_25_040245) do t.datetime "created_at", null: false t.string "description" t.boolean "is_top_level_path", default: false + t.boolean "landing_page", default: false, null: false t.text "processed_html" t.string "slug" t.string "social_image"