Adding resources (imported from old toolshare)

This commit is contained in:
2014-02-09 00:54:03 -07:00
parent 56450cf319
commit 1d0e8721e1
17 changed files with 212 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
class CreateResources < ActiveRecord::Migration
def up
create_table "resources", :force => true do |t|
t.string "type"
t.integer "owner_id"
t.integer "category_id"
t.string "name"
t.string "serial"
t.string "specs"
t.string "status"
t.boolean "donatable"
t.string "picture_file_name"
t.string "picture_content_type"
t.integer "picture_file_size"
t.datetime "picture_updated_at"
t.text "notes"
t.datetime "created_at"
t.datetime "updated_at"
t.string "estimated_value"
end
end
def down
drop_table :resources
end
end

View File

@@ -0,0 +1,14 @@
class CreateCategories < ActiveRecord::Migration
def up
create_table "resource_categories", :force => true do |t|
t.string "name"
t.datetime "created_at"
t.datetime "updated_at"
t.string "parent"
end
end
def down
drop_table :resource_categories
end
end

View File

@@ -0,0 +1,27 @@
class CreateToolshareUsers < ActiveRecord::Migration
def up
create_table "toolshare_users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "password_salt", :default => "", :null => false
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.string "reset_password_token"
t.string "remember_token"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
t.string "name"
end
end
def down
drop_table :toolshare_users
end
end

View File

@@ -0,0 +1,5 @@
class ChangeResourceTypeToSuperCategory < ActiveRecord::Migration
def change
rename_column :resources, :type, :supercategory
end
end