Skip to content

Commit fefdf8f

Browse files
committed
Add/Run migration to add "published" to articles table
1 parent 9247fd7 commit fefdf8f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddPublishedToArticle < ActiveRecord::Migration[5.2]
2+
def change
3+
add_column :articles, :published, :boolean, default: true, null: false
4+
end
5+
end

db/schema.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 2019_10_20_170531) do
13+
ActiveRecord::Schema.define(version: 2019_10_20_182233) do
1414

1515
# These are extensions that must be enabled in order to support this database
1616
enable_extension "plpgsql"
@@ -21,6 +21,7 @@
2121
t.text "body_markdown", null: false
2222
t.datetime "created_at", null: false
2323
t.datetime "updated_at", null: false
24+
t.boolean "published", default: true, null: false
2425
t.index ["handle"], name: "index_articles_on_handle"
2526
end
2627

0 commit comments

Comments
 (0)