Added welcome and profile actions to the my controller
This commit is contained in:
parent
8e4dd058b6
commit
020a864736
12 changed files with 125 additions and 19 deletions
|
|
@ -0,0 +1,7 @@
|
|||
# Previous local accounts have NULL as its value for the 'provider'.
|
||||
# Turn that into an explicit 'local' string.
|
||||
class ChangeUsersDefaultProviderLocal < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
execute "update users set provider='local' where provider is null"
|
||||
end
|
||||
end
|
||||
5
db/migrate/20170422182228_add_admin_field_to_users.rb
Normal file
5
db/migrate/20170422182228_add_admin_field_to_users.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class AddAdminFieldToUsers < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :users, :admin, :integer, default: 0
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class AddScreenshotReferenceToUsers < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :screenshots, :user_id, :integer, default: 0
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170406155141) do
|
||||
ActiveRecord::Schema.define(version: 20170422183028) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -58,6 +58,7 @@ ActiveRecord::Schema.define(version: 20170406155141) do
|
|||
t.integer "image_file_size"
|
||||
t.datetime "image_updated_at"
|
||||
t.string "image_fingerprint"
|
||||
t.integer "user_id", default: 0
|
||||
t.index ["id", "approved"], name: "id_approved", using: :btree
|
||||
t.index ["id", "uploaderhash"], name: "id_uploaderhash", using: :btree
|
||||
end
|
||||
|
|
@ -78,6 +79,7 @@ ActiveRecord::Schema.define(version: 20170406155141) do
|
|||
t.datetime "locked_at"
|
||||
t.string "provider"
|
||||
t.string "uid"
|
||||
t.integer "admin", default: 0
|
||||
t.index ["email", "provider"], name: "index_users_on_email_and_provider", unique: true, using: :btree
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue