mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Disable StrongMigrations
This commit is contained in:
parent
eaf66c8bbd
commit
b6d1f1d46d
3 changed files with 27 additions and 27 deletions
|
|
@ -1,31 +1,31 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
return unless Rails.env.development?
|
||||
# return unless Rails.env.development?
|
||||
|
||||
# Mark existing migrations as safe
|
||||
StrongMigrations.start_after = 20_250_122_150_500
|
||||
# # Mark existing migrations as safe
|
||||
# StrongMigrations.start_after = 20_250_122_150_500
|
||||
|
||||
# Set timeouts for migrations
|
||||
# PgBouncer in transaction mode doesn't support SET commands
|
||||
# Timeouts should be set on the database user instead
|
||||
# StrongMigrations.lock_timeout = 10.seconds
|
||||
# StrongMigrations.statement_timeout = 1.hour
|
||||
# # Set timeouts for migrations
|
||||
# # PgBouncer in transaction mode doesn't support SET commands
|
||||
# # Timeouts should be set on the database user instead
|
||||
# # StrongMigrations.lock_timeout = 10.seconds
|
||||
# # StrongMigrations.statement_timeout = 1.hour
|
||||
|
||||
# Analyze tables after indexes are added
|
||||
# Outdated statistics can sometimes hurt performance
|
||||
StrongMigrations.auto_analyze = true
|
||||
# # Analyze tables after indexes are added
|
||||
# # Outdated statistics can sometimes hurt performance
|
||||
# StrongMigrations.auto_analyze = true
|
||||
|
||||
# Set the version of the production database
|
||||
# so the right checks are run in development
|
||||
# StrongMigrations.target_version = 10
|
||||
# # Set the version of the production database
|
||||
# # so the right checks are run in development
|
||||
# # StrongMigrations.target_version = 10
|
||||
|
||||
# Add custom checks
|
||||
# StrongMigrations.add_check do |method, args|
|
||||
# if method == :add_index && args[0].to_s == "users"
|
||||
# stop! "No more indexes on the users table"
|
||||
# end
|
||||
# end
|
||||
# # Add custom checks
|
||||
# # StrongMigrations.add_check do |method, args|
|
||||
# # if method == :add_index && args[0].to_s == "users"
|
||||
# # stop! "No more indexes on the users table"
|
||||
# # end
|
||||
# # end
|
||||
|
||||
# Make some operations safe by default
|
||||
# See https://github.com/ankane/strong_migrations#safe-by-default
|
||||
# StrongMigrations.safe_by_default = true
|
||||
# # Make some operations safe by default
|
||||
# # See https://github.com/ankane/strong_migrations#safe-by-default
|
||||
# # StrongMigrations.safe_by_default = true
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
class AddVisitedCountriesToTrips < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
safety_assured do
|
||||
# safety_assured do
|
||||
execute <<-SQL
|
||||
ALTER TABLE trips ADD COLUMN visited_countries JSONB DEFAULT '{}'::jsonb NOT NULL;
|
||||
SQL
|
||||
end
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ class AddH3HexIdsToStats < ActiveRecord::Migration[8.0]
|
|||
|
||||
def change
|
||||
add_column :stats, :h3_hex_ids, :jsonb, default: {}, if_not_exists: true
|
||||
safety_assured do
|
||||
# safety_assured do
|
||||
add_index :stats, :h3_hex_ids, using: :gin,
|
||||
where: "(h3_hex_ids IS NOT NULL AND h3_hex_ids != '{}'::jsonb)",
|
||||
algorithm: :concurrently, if_not_exists: true
|
||||
end
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue