Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
commit
bdea0ee36a
@ -0,0 +1,3 @@
|
||||
class Attachmentstype < ActiveRecord::Base
|
||||
attr_accessible :typeId, :typeName
|
||||
end
|
@ -0,0 +1,12 @@
|
||||
class CreateAttachmentstypes < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :attachmentstypes do |t|
|
||||
t.column :typeId, :integer, :null => false
|
||||
t.column :typeName, :string, :limit =>50
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :attachmentstypes
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddAttachtypeToAttachments < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :attachments, :attachtype, :int
|
||||
end
|
||||
end
|
@ -0,0 +1,9 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
|
||||
one:
|
||||
typeId:
|
||||
typeName:
|
||||
|
||||
two:
|
||||
typeId:
|
||||
typeName:
|
@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class AttachmentstypeTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
Loading…
Reference in new issue