diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180704144707_unrequire_blog_slug.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 4 |
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 @@ | |||
1 | class UnrequireBlogSlug < ActiveRecord::Migration[5.1] | ||
2 | def change | ||
3 | change_column_null :blogs, :slug, true | ||
4 | end | ||
5 | end | ||
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 | ||
13 | ActiveRecord::Schema.define(version: 20180704125527) do | 13 | ActiveRecord::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 |