mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-03 21:33:48 +00:00
Added tournament backups to the database and added pages to restore and create backups
This commit is contained in:
16
db/migrate/20241224132705_create_tournament_backups.rb
Normal file
16
db/migrate/20241224132705_create_tournament_backups.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class CreateTournamentBackups < ActiveRecord::Migration[7.0]
|
||||
def up
|
||||
create_table :tournament_backups do |t|
|
||||
t.integer :tournament_id, null: false, foreign_key: true
|
||||
t.text :backup_data, null: false, limit: 4294967295 # Use LONGTEXT for large backups
|
||||
t.string :backup_reason
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
# Drop the table
|
||||
drop_table :tournament_backups
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user