mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Fix specs for avatars
Implement avatar picker Correct avatar related jobs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class AddUserAvatars < ActiveRecord::Migration
|
||||
def change
|
||||
def up
|
||||
create_table :user_avatars do |t|
|
||||
t.integer :user_id, null: false
|
||||
t.integer :system_upload_id
|
||||
@@ -8,5 +8,17 @@ class AddUserAvatars < ActiveRecord::Migration
|
||||
t.datetime :last_gravatar_download_attempt
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :user_avatars, [:user_id]
|
||||
|
||||
execute <<SQL
|
||||
INSERT INTO user_avatars(user_id, custom_upload_id)
|
||||
SELECT id, uploaded_avatar_id
|
||||
FROM users
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
drop_table :user_avatars
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class RemoveUploadedAvatarTemplateFromUsers < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :users, :uploaded_avatar_template
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user