增加一个说说数据库表
This commit is contained in:
parent
6fafc6a66f
commit
3674fe06cb
|
@ -0,0 +1,2 @@
|
|||
class Word < ActiveRecord::Base
|
||||
end
|
|
@ -0,0 +1,10 @@
|
|||
class CreateWords < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :words do |t|
|
||||
t.string :name
|
||||
t.text :description
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20151204094413) do
|
||||
ActiveRecord::Schema.define(version: 20160103065324) do
|
||||
|
||||
create_table "article_comments", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
|
@ -57,4 +57,11 @@ ActiveRecord::Schema.define(version: 20151204094413) do
|
|||
add_index "users", ["email"], name: "index_users_on_email"
|
||||
add_index "users", ["username"], name: "index_users_on_username"
|
||||
|
||||
create_table "words", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
name: MyString
|
||||
description: MyText
|
||||
|
||||
two:
|
||||
name: MyString
|
||||
description: MyText
|
|
@ -0,0 +1,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class WordTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
Loading…
Reference in New Issue