Add reminder feature

This commit is contained in:
2020-02-12 13:57:03 +01:00
parent 9ec7b3ef50
commit e4a317111c
26 changed files with 414 additions and 3 deletions

View File

@ -0,0 +1,12 @@
class CreateReminders < ActiveRecord::Migration[6.0]
def change
create_table :reminders do |t|
t.string :title
t.text :body
t.datetime :date
t.references :user, null: false, foreign_key: true
t.timestamps
end
end
end

View File

@ -10,7 +10,17 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_02_12_122504) do
ActiveRecord::Schema.define(version: 2020_02_12_122724) do
create_table "reminders", force: :cascade do |t|
t.string "title"
t.text "body"
t.datetime "date"
t.integer "user_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["user_id"], name: "index_reminders_on_user_id"
end
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
@ -24,4 +34,5 @@ ActiveRecord::Schema.define(version: 2020_02_12_122504) do
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
end
add_foreign_key "reminders", "users"
end