about summary refs log tree commit diff stats
path: root/db
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-07-04 11:46:13 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-07-04 11:46:13 -0400
commite11dedec034c4180985adf4a9f176b07121f0a41 (patch)
tree7f4320d562f37775cbc8ae390540da03a2d92d77 /db
parentd48adb741c5c30ba3f2d3c039a7e342b43add352 (diff)
downloadthoughts-e11dedec034c4180985adf4a9f176b07121f0a41.tar.gz
thoughts-e11dedec034c4180985adf4a9f176b07121f0a41.tar.bz2
thoughts-e11dedec034c4180985adf4a9f176b07121f0a41.zip
Blog drafts no longer require slugs
They do still technically require titles, but the engine will fill in "Untitled draft" if it is left blank. Unpublished posts can be viewed at a different URL than published posts would be. Quick links to view published and unpublished posts have been added to the admin panel.

refs #1
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180704144707_unrequire_blog_slug.rb5
-rw-r--r--db/schema.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/db/migrate/20180704144707_unrequire_blog_slug.rb b/db/migrate/20180704144707_unrequire_blog_slug.rb new file mode 100644 index 0000000..e9444db --- /dev/null +++ b/db/migrate/20180704144707_unrequire_blog_slug.rb
@@ -0,0 +1,5 @@
1class UnrequireBlogSlug < ActiveRecord::Migration[5.1]
2 def change
3 change_column_null :blogs, :slug, true
4 end
5end
diff --git a/db/schema.rb b/db/schema.rb index d885500..0279d8e 100644 --- a/db/schema.rb +++ b/db/schema.rb
@@ -10,12 +10,12 @@
10# 10#
11# It's strongly recommended that you check this file into your version control system. 11# It's strongly recommended that you check this file into your version control system.
12 12
13ActiveRecord::Schema.define(version: 20180704125527) do 13ActiveRecord::Schema.define(version: 20180704144707) do
14 14
15 create_table "blogs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t| 15 create_table "blogs", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" do |t|
16 t.string "title" 16 t.string "title"
17 t.text "body" 17 t.text "body"
18 t.string "slug", null: false 18 t.string "slug"
19 t.datetime "created_at", null: false 19 t.datetime "created_at", null: false
20 t.datetime "updated_at", null: false 20 t.datetime "updated_at", null: false
21 t.boolean "published", default: false, null: false 21 t.boolean "published", default: false, null: false