Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adnjoo committed Oct 23, 2024
1 parent cf2ea1a commit f5ed6d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base
# Set the Stripe API key before any controller action is called.
before_action :set_stripe_key

# Allow related fields to be set during e.g. sign up, account update.
# Allow related fields to be set during e.g. account update.
before_action :configure_permitted_parameters, if: :devise_controller?

protected
Expand Down
2 changes: 0 additions & 2 deletions db/migrate/20241023025452_add_username_and_public_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
class AddUsernameAndPublicToUsers < ActiveRecord::Migration[7.2]
def change
# Allow username to be null
add_column :users, :username, :string, null: true
add_column :users, :public, :boolean, default: false

# Add a unique index to the username column
# Ensure the unique index allows multiple null values
add_index :users, :username, unique: true, where: "username IS NOT NULL"
end
end

0 comments on commit f5ed6d4

Please sign in to comment.