1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Upgraded to rails 8.0.2, moved from dalli to solid cache, moved from delayed_job to solid queue, and add solid cable. deploy/rails-dev-run.sh no longer needs to chmod. Fixed finished_at callback for matches. Migrated from Devise to built in rails auth. Added view tests for the bracket page testing that all bout numbers render for all matches in each bracket type.

This commit is contained in:
2025-04-08 17:54:42 -04:00
parent 9c25a6cc39
commit 2d433b680a
118 changed files with 4921 additions and 1341 deletions

View File

@@ -0,0 +1,32 @@
class RemoveDelayedJob < ActiveRecord::Migration[8.0]
def up
# Check if delayed_jobs table exists before trying to drop it
if table_exists?(:delayed_jobs)
drop_table :delayed_jobs
puts "Dropped delayed_jobs table"
else
puts "delayed_jobs table doesn't exist, skipping"
end
end
def down
# Recreate delayed_jobs table if needed in the future
create_table :delayed_jobs, force: true do |table|
table.integer :priority, default: 0, null: false
table.integer :attempts, default: 0, null: false
table.text :handler, limit: 4294967295
table.text :last_error
table.datetime :run_at, precision: nil
table.datetime :locked_at, precision: nil
table.datetime :failed_at, precision: nil
table.string :locked_by
table.string :queue
table.datetime :created_at, precision: nil
table.datetime :updated_at, precision: nil
table.integer :job_owner_id
table.string :job_owner_type
table.index [:priority, :run_at], name: "delayed_jobs_priority"
end
end
end

View File

@@ -0,0 +1,21 @@
class AddPasswordDigestToUsers < ActiveRecord::Migration[6.1]
def change
# Add password_digest column if it doesn't already exist
add_column :users, :password_digest, :string unless column_exists?(:users, :password_digest)
# If we're migrating from Devise, we need to convert encrypted_password to password_digest
# This is a data migration that will preserve the passwords
reversible do |dir|
dir.up do
# Only perform if both columns exist
if column_exists?(:users, :encrypted_password) && column_exists?(:users, :password_digest)
execute <<-SQL
-- Copy over the encrypted_password to password_digest column for all users
-- Devise uses the same bcrypt format that has_secure_password expects
UPDATE users SET password_digest = encrypted_password WHERE password_digest IS NULL;
SQL
end
end
end
end
end

View File

@@ -0,0 +1,6 @@
class AddResetColumnsToUsers < ActiveRecord::Migration[6.1]
def change
add_column :users, :reset_digest, :string unless column_exists?(:users, :reset_digest)
add_column :users, :reset_sent_at, :datetime unless column_exists?(:users, :reset_sent_at)
end
end