Skip to content

Commit

Permalink
Added saved searches model (#743)
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Freund <jfreund@myvest.com>
  • Loading branch information
richardxia and Joe Freund committed Jun 22, 2024
1 parent 547e601 commit a0d63d8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions db/migrate/20240606002826_create_saved_searches.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class CreateSavedSearches < ActiveRecord::Migration[6.1]
def change
create_table :saved_searches do |t|
t.references :user, foreign_key: true
t.string :name
t.jsonb :search, null: false, default: '{}'
t.timestamps
end
end
end
10 changes: 10 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,15 @@
t.index ["feedback_id"], name: "index_reviews_on_feedback_id"
end

create_table "saved_searches", force: :cascade do |t|
t.bigint "user_id"
t.string "name"
t.jsonb "search", default: "{}", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["user_id"], name: "index_saved_searches_on_user_id"
end

create_table "schedule_days", force: :cascade do |t|
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
Expand Down Expand Up @@ -508,6 +517,7 @@
add_foreign_key "resources_sites", "resources"
add_foreign_key "resources_sites", "sites"
add_foreign_key "reviews", "feedbacks"
add_foreign_key "saved_searches", "users"
add_foreign_key "schedule_days", "schedules"
add_foreign_key "schedules", "resources"
add_foreign_key "schedules", "services"
Expand Down

0 comments on commit a0d63d8

Please sign in to comment.