Skip to content

Commit

Permalink
Add attributes to Tag and Destination models. (TODO: seed database)
Browse files Browse the repository at this point in the history
  • Loading branch information
seafr committed Aug 18, 2017
1 parent ebc7ba8 commit 27e6426
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db/migrate/20170817201654_create_tags.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class CreateTags < ActiveRecord::Migration
def change
create_table :tags do |t|
t.string :title
t.string :image

t.timestamps null: false
end
Expand Down
4 changes: 4 additions & 0 deletions db/migrate/20170817201739_create_destinations.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
class CreateDestinations < ActiveRecord::Migration
def change
create_table :destinations do |t|
t.string :name
t.string :image
t.string :description
t.references :tag

t.timestamps null: false
end
Expand Down
26 changes: 26 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20170817201739) do

create_table "destinations", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "tags", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

end

0 comments on commit 27e6426

Please sign in to comment.