Adding user_certifications relation, and paperclip gem
This commit is contained in:
5
db/migrate/20130125101623_add_instructor_to_users.rb
Normal file
5
db/migrate/20130125101623_add_instructor_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddInstructorToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :instructor, :boolean
|
||||
end
|
||||
end
|
||||
10
db/migrate/20130125102002_create_user_certifications.rb
Normal file
10
db/migrate/20130125102002_create_user_certifications.rb
Normal 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
|
||||
17
db/schema.rb
17
db/schema.rb
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user