Skip to content

Commit ef3656b

Browse files
authored
General updates (#1099)
* Initial commit * ran migration * update database_consistency gem and nodejs version
1 parent baf8f54 commit ef3656b

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN apt-get update -qq && \
1919
libyaml-dev
2020

2121
# Add Node, required for asset pipeline.
22-
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
22+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
2323
apt-get install -y nodejs && \
2424
npm install -q -g yarn
2525

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ group :development, :test do
4949
gem 'brakeman', '~> 7.0.2', require: false
5050
gem 'bullet', '~> 8.0', '>= 8.0.8'
5151
gem 'colorize', '~> 1.1.0'
52-
gem 'consistency_fail'
52+
gem 'database_consistency', '~> 2.0.6'
5353
gem 'dotenv-rails', '~> 3.1.8'
5454
gem 'guard-livereload', '~> 2.5.2'
5555
gem 'guard-rspec', '~> 4.7.3', require: false

Gemfile.lock

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ GEM
112112
colorize (1.1.0)
113113
concurrent-ruby (1.3.5)
114114
connection_pool (2.5.4)
115-
consistency_fail (0.3.7)
116115
crass (1.0.6)
116+
database_consistency (2.0.6)
117+
activerecord (>= 3.2)
117118
date (3.4.1)
118119
devise (4.9.4)
119120
bcrypt (~> 3.0)
@@ -250,6 +251,7 @@ GEM
250251
mina (1.2.5)
251252
rake
252253
mini_mime (1.1.5)
254+
minitest (5.25.5)
253255
mini_portile2 (2.8.9)
254256
minitest (5.26.0)
255257
mollie-api-ruby (4.17.0)
@@ -277,9 +279,6 @@ GEM
277279
net-ssh (7.3.0)
278280
netrc (0.11.0)
279281
nio4r (2.7.4)
280-
nokogiri (1.18.8)
281-
mini_portile2 (~> 2.8.2)
282-
racc (~> 1.4)
283282
nokogiri (1.18.8-x86_64-linux-gnu)
284283
racc (~> 1.4)
285284
notiffany (0.1.3)
@@ -597,7 +596,6 @@ GEM
597596
zeitwerk (2.7.3)
598597

599598
PLATFORMS
600-
ruby
601599
x86_64-linux
602600

603601
DEPENDENCIES
@@ -610,7 +608,7 @@ DEPENDENCIES
610608
bullet (~> 8.0, >= 8.0.8)
611609
capistrano-sidekiq (~> 3.0.0)
612610
colorize (~> 1.1.0)
613-
consistency_fail
611+
database_consistency (~> 2.0.6)
614612
devise (~> 4.9.4)
615613
devise-i18n (~> 1.13.0)
616614
dotenv-rails (~> 3.1.8)

app/views/layouts/application.html.erb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
environment: '<%= Rails.env %>',
3232
release: '<%= ENV['BUILD_HASH'] %>'
3333
});
34-
Sentry.configureScope(scope => {
35-
scope.setUser({ id: <%= current_user&.id || 'null' %> });
36-
});
34+
Sentry.setUser({ id: <%= current_user&.id.to_json %> });
3735
</script>
3836
<% end %>
3937

bin/ci.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ if [ "${TYPE}" = "lint" ] || [ "${TYPE}" = "" ]; then
1414
gem install bundler-audit
1515
bundle-audit update && bundle-audit check --ignore CVE-2015-9284 || true
1616
RAILS_ENV=test bundle exec rails db:create db:environment:set db:schema:load
17-
# Don't check DB consistency until solved: https://github.com/trptcolin/consistency_fail/issues/42
18-
# bundle exec consistency_fail
17+
# uncomment when it does not fail anymore :)
18+
# bundle exec database_consistency
1919

2020
echo "--- :eslint: Yarn lint"
2121
yarn install # Why do I need to do this again? This was done in Dockerfile, rite?
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class RemoveOrderTotalFromOrders < ActiveRecord::Migration[7.2]
2+
def change
3+
remove_column :orders, :order_total, :decimal
4+
end
5+
end

db/schema.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.2].define(version: 2025_09_13_233761) do
13+
ActiveRecord::Schema[7.2].define(version: 2025_10_26_202155) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "plpgsql"
1616

@@ -81,7 +81,6 @@
8181
end
8282

8383
create_table "orders", force: :cascade do |t|
84-
t.decimal "order_total", precision: 8, scale: 2
8584
t.bigint "activity_id", null: false
8685
t.bigint "user_id"
8786
t.datetime "deleted_at"

0 commit comments

Comments
 (0)