mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Almost usable, still a lot of work left
-Moved bikes to User model instead of profile -User can copy user log to a bike log with new actsasloggable -Added user stats -some css was messing up checkboxes, need to figure out which stylesheet was doing that
This commit is contained in:
@@ -19,8 +19,6 @@ class DeviseCreateUsers < ActiveRecord::Migration
|
||||
t.string :current_sign_in_ip
|
||||
t.string :last_sign_in_ip
|
||||
|
||||
t.integer :user_role_id
|
||||
|
||||
## Encryptable
|
||||
# t.string :password_salt
|
||||
|
||||
@@ -39,6 +37,11 @@ class DeviseCreateUsers < ActiveRecord::Migration
|
||||
# t.string :authentication_token
|
||||
|
||||
|
||||
#I need to move these elsewhere eventually
|
||||
t.integer :user_role_id, :null => false, :default => 1
|
||||
#one bike per user for now
|
||||
t.integer :bike_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
@@ -47,5 +50,7 @@ class DeviseCreateUsers < ActiveRecord::Migration
|
||||
# add_index :users, :confirmation_token, :unique => true
|
||||
# add_index :users, :unlock_token, :unique => true
|
||||
# add_index :users, :authentication_token, :unique => true
|
||||
|
||||
add_index :users, :bike_id, :unique => true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,5 +14,7 @@ class CreateBike < ActiveRecord::Migration
|
||||
t.integer "bike_status_id", :null => false
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :bikes, :serial_number, :unique => true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,7 +2,6 @@ class CreateUserProfile < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :user_profiles do |t|
|
||||
t.integer "user_id", :null => false
|
||||
t.integer "bike_id"
|
||||
t.string "first_name"
|
||||
t.string "last_name"
|
||||
t.string "addrStreet1"
|
||||
|
||||
+5
-2
@@ -62,6 +62,8 @@ ActiveRecord::Schema.define(:version => 20121229160809) do
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
add_index "bikes", ["serial_number"], :name => "index_bikes_on_serial_number", :unique => true
|
||||
|
||||
create_table "logs", :force => true do |t|
|
||||
t.integer "loggable_id"
|
||||
t.string "loggable_type"
|
||||
@@ -99,7 +101,6 @@ ActiveRecord::Schema.define(:version => 20121229160809) do
|
||||
|
||||
create_table "user_profiles", :force => true do |t|
|
||||
t.integer "user_id", :null => false
|
||||
t.integer "bike_id"
|
||||
t.string "first_name"
|
||||
t.string "last_name"
|
||||
t.string "addrStreet1"
|
||||
@@ -130,7 +131,8 @@ ActiveRecord::Schema.define(:version => 20121229160809) do
|
||||
t.datetime "last_sign_in_at"
|
||||
t.string "current_sign_in_ip"
|
||||
t.string "last_sign_in_ip"
|
||||
t.integer "user_role_id"
|
||||
t.integer "user_role_id", :default => 1, :null => false
|
||||
t.integer "bike_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "failed_attempts", :default => 0
|
||||
@@ -141,6 +143,7 @@ ActiveRecord::Schema.define(:version => 20121229160809) do
|
||||
t.string "nickname"
|
||||
end
|
||||
|
||||
add_index "users", ["bike_id"], :name => "index_users_on_bike_id", :unique => true
|
||||
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
||||
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user