test/dummy/db/schema.rb in upgrow-0.0.2 vs test/dummy/db/schema.rb in upgrow-0.0.3
- old
+ new
@@ -8,15 +8,38 @@
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2021_02_19_211631) do
+ActiveRecord::Schema.define(version: 2021_04_09_164927) do
create_table "articles", force: :cascade do |t|
t.string "title", null: false
t.text "body", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
+ t.integer "user_id", null: false
+ t.index ["user_id"], name: "index_articles_on_user_id"
end
+ create_table "comments", force: :cascade do |t|
+ t.integer "article_id", null: false
+ t.text "body", null: false
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.integer "user_id", null: false
+ t.index ["article_id"], name: "index_comments_on_article_id"
+ t.index ["user_id"], name: "index_comments_on_user_id"
+ end
+
+ create_table "users", force: :cascade do |t|
+ t.string "email", null: false
+ t.string "password_digest", null: false
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["email"], name: "index_users_on_email", unique: true
+ end
+
+ add_foreign_key "articles", "users"
+ add_foreign_key "comments", "articles"
+ add_foreign_key "comments", "users"
end