mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
rename custom_name to username + fix audit logs
This commit is contained in:
5
db/migrate/20251021211039_rename_custom_username.rb
Normal file
5
db/migrate/20251021211039_rename_custom_username.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class RenameCustomUsername < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
rename_column :users, :custom_name, :username
|
||||
end
|
||||
end
|
||||
4
db/schema.rb
generated
4
db/schema.rb
generated
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_10_21_202329) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_10_21_211039) do
|
||||
create_schema "pganalyze"
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
@@ -562,7 +562,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_10_21_202329) do
|
||||
t.boolean "allow_public_stats_lookup", default: true, null: false
|
||||
t.boolean "default_timezone_leaderboard", default: true, null: false
|
||||
t.integer "admin_level", default: 0, null: false
|
||||
t.string "custom_name"
|
||||
t.string "username"
|
||||
t.index ["github_uid", "github_access_token"], name: "index_users_on_github_uid_and_access_token"
|
||||
t.index ["github_uid"], name: "index_users_on_github_uid"
|
||||
t.index ["slack_uid"], name: "index_users_on_slack_uid", unique: true
|
||||
|
||||
@@ -14,7 +14,7 @@ Doorkeeper::Application.find_or_create_by(
|
||||
if Rails.env.development?
|
||||
# Creating test user
|
||||
test_user = User.find_or_create_by(slack_uid: 'TEST123456') do |user|
|
||||
user.custom_name = 'testuser'
|
||||
user.username = 'testuser'
|
||||
user.slack_username = 'testuser'
|
||||
|
||||
# Before you had user.is_admin = true, does not work, changed it to that, looks like it works but idk how to use the admin pages so pls check this, i just guess coded this, the cmd to seed the db works without errors
|
||||
|
||||
Reference in New Issue
Block a user