Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

301: create model trend #58

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/models/trend.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Trend < ApplicationRecord
end
11 changes: 11 additions & 0 deletions db/migrate/20190826140938_create_trends.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CreateTrends < ActiveRecord::Migration[5.2]
def change
create_table :trends do |t|
t.string :name
t.text :description
t.integer :status

t.timestamps
end
end
end
8 changes: 8 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@
t.index ["user_id"], name: "index_rooms_on_user_id"
end

create_table "trends", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "name"
t.text "description"
t.integer "status"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "users", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
Expand Down