mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Add strong_migrations gem
This commit is contained in:
parent
b76fcb5f7d
commit
6f791401de
7 changed files with 48 additions and 0 deletions
1
Gemfile
1
Gemfile
|
|
@ -11,6 +11,7 @@ gem 'puma', '~> 5.0'
|
|||
gem 'pundit', '~> 2.2'
|
||||
gem 'rails', '7.0.4'
|
||||
gem 'sprockets-rails'
|
||||
gem 'strong_migrations'
|
||||
gem 'stimulus-rails'
|
||||
gem 'tailwindcss-rails'
|
||||
gem 'turbo-rails'
|
||||
|
|
|
|||
|
|
@ -227,6 +227,8 @@ GEM
|
|||
sprockets (>= 3.0.0)
|
||||
stimulus-rails (1.2.1)
|
||||
railties (>= 6.0.0)
|
||||
strong_migrations (1.4.2)
|
||||
activerecord (>= 5.2)
|
||||
tailwindcss-rails (2.0.21-aarch64-linux)
|
||||
railties (>= 6.0.0)
|
||||
tailwindcss-rails (2.0.21-arm64-darwin)
|
||||
|
|
@ -268,6 +270,7 @@ DEPENDENCIES
|
|||
simplecov (~> 0.21)
|
||||
sprockets-rails
|
||||
stimulus-rails
|
||||
strong_migrations
|
||||
tailwindcss-rails
|
||||
turbo-rails
|
||||
tzinfo-data
|
||||
|
|
|
|||
3
Makefile
3
Makefile
|
|
@ -45,6 +45,9 @@ start_sidekiq:
|
|||
start:
|
||||
docker-compose up -d solo_customer_template_app
|
||||
make debug
|
||||
|
||||
overmind:
|
||||
overmind start -f Procfile.dev
|
||||
# Running the project
|
||||
|
||||
test:
|
||||
|
|
|
|||
4
Procfile
Normal file
4
Procfile
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
web: bundle exec puma -C config/puma.rb
|
||||
worker: bundle exec sidekiq -C config/sidekiq.yml
|
||||
|
||||
release: bundle exec rails db:migrate
|
||||
10
app.json
Normal file
10
app.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"formation": {
|
||||
"web": {
|
||||
"quantity": 1
|
||||
},
|
||||
"worker": {
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +1,3 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
include Pundit::Authorization
|
||||
end
|
||||
|
|
|
|||
26
config/initializers/strong_migrations.rb
Normal file
26
config/initializers/strong_migrations.rb
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Mark existing migrations as safe
|
||||
StrongMigrations.start_after = 20230203144254
|
||||
|
||||
# Set timeouts for migrations
|
||||
# If you use PgBouncer in transaction mode, delete these lines and set timeouts on the database user
|
||||
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
|
||||
|
||||
# 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
|
||||
|
||||
# Make some operations safe by default
|
||||
# See https://github.com/ankane/strong_migrations#safe-by-default
|
||||
# StrongMigrations.safe_by_default = true
|
||||
Loading…
Reference in a new issue