Tidy up homepage and navigation
This commit is contained in:
20
db/migrate/20251108042936_create_default_dsn.rb
Normal file
20
db/migrate/20251108042936_create_default_dsn.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
class CreateDefaultDsn < ActiveRecord::Migration[8.1]
|
||||
def change
|
||||
reversible do |dir|
|
||||
dir.up do
|
||||
# Only create if no DSNs exist
|
||||
if Dsn.count == 0
|
||||
Dsn.create!(
|
||||
name: 'Development DSN',
|
||||
key: 'dev-test-key-1234567890abcdef',
|
||||
enabled: true
|
||||
)
|
||||
end
|
||||
end
|
||||
dir.down do
|
||||
# Remove the default DSN if it exists
|
||||
Dsn.where(key: 'dev-test-key-1234567890abcdef').delete_all
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user