mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Merge pull request #118 from ilya-konanykhin/issue-105-106
Issue #105, #106: photo upload for User & Bike
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class AddAttachmentAvatarToUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_table :users do |t|
|
||||
t.attachment :avatar
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_attachment :users, :avatar
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
class AddAttachmentPhotoToBikes < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_table :bikes do |t|
|
||||
t.attachment :photo
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_attachment :bikes, :photo
|
||||
end
|
||||
end
|
||||
+9
-1
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20131019170248) do
|
||||
ActiveRecord::Schema.define(:version => 20170118112258) do
|
||||
|
||||
create_table "bike_actions", :force => true do |t|
|
||||
t.string "action", :limit => 128, :null => false
|
||||
@@ -73,6 +73,10 @@ ActiveRecord::Schema.define(:version => 20131019170248) do
|
||||
t.string "model"
|
||||
t.integer "shop_id"
|
||||
t.integer "bike_wheel_size_id"
|
||||
t.string "photo_file_name"
|
||||
t.string "photo_content_type"
|
||||
t.integer "photo_file_size"
|
||||
t.datetime "photo_updated_at"
|
||||
end
|
||||
|
||||
create_table "credit_conversions", :force => true do |t|
|
||||
@@ -198,6 +202,10 @@ ActiveRecord::Schema.define(:version => 20131019170248) do
|
||||
t.string "first_name", :default => "", :null => false
|
||||
t.string "last_name", :default => "", :null => false
|
||||
t.string "username"
|
||||
t.string "avatar_file_name"
|
||||
t.string "avatar_content_type"
|
||||
t.integer "avatar_file_size"
|
||||
t.datetime "avatar_updated_at"
|
||||
end
|
||||
|
||||
add_index "users", ["bike_id"], :name => "index_users_on_bike_id", :unique => true
|
||||
|
||||
Reference in New Issue
Block a user