Adding user_certifications relation, and paperclip gem

This commit is contained in:
2013-01-25 03:50:53 -07:00
parent 43d949dc1d
commit 6e77b2bf68
25 changed files with 296 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
class AddInstructorToUsers < ActiveRecord::Migration
def change
add_column :users, :instructor, :boolean
end
end

View File

@@ -0,0 +1,10 @@
class CreateUserCertifications < ActiveRecord::Migration
def change
create_table :user_certifications do |t|
t.integer :user_id
t.integer :certification_id
t.timestamps
end
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20121016211727) do
ActiveRecord::Schema.define(:version => 20130125102002) do
create_table "cards", :force => true do |t|
t.string "card_number"
@@ -21,6 +21,13 @@ ActiveRecord::Schema.define(:version => 20121016211727) do
t.string "name"
end
create_table "certifications", :force => true do |t|
t.string "name"
t.string "description"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "door_logs", :force => true do |t|
t.string "key"
t.integer "data"
@@ -28,6 +35,13 @@ ActiveRecord::Schema.define(:version => 20121016211727) do
t.datetime "updated_at", :null => false
end
create_table "user_certifications", :force => true do |t|
t.integer "user_id"
t.integer "certification_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "users", :force => true do |t|
t.string "name"
t.datetime "created_at", :null => false
@@ -54,6 +68,7 @@ ActiveRecord::Schema.define(:version => 20121016211727) do
t.string "phone"
t.string "current_skills"
t.string "desired_skills"
t.boolean "instructor"
end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true