Stuff to try on other machines - crash if DB is wrong

pull/993/head
Rick Carlino 2018-09-21 11:03:58 -05:00
parent accd7a8ed8
commit 9a4a792636
3 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,6 @@
unless Rails.env == "production"
puts "Seeding database: " + ActiveRecord::Base.connection.current_database
unless Rails.env == "development"
POINT_COUNT = 8
PLANT_COUNT = 8
DATE_RANGE_LO = 1..3

View File

@ -1218,7 +1218,8 @@ CREATE TABLE public.web_app_configs (
discard_unsaved boolean DEFAULT false,
xy_swap boolean DEFAULT false,
home_button_homing boolean DEFAULT false,
show_motor_plot boolean DEFAULT false
show_motor_plot boolean DEFAULT false,
show_historic_points boolean DEFAULT false
);
@ -2324,6 +2325,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20180813185430'),
('20180815143819'),
('20180829211322'),
('20180910143055');
('20180910143055'),
('20180920194120');

View File

@ -93,8 +93,9 @@ RSpec.configure do |config|
config.include Helpers
config.infer_spec_type_from_file_location!
config.order = "random"
config.after(:each) do
puts "===" + ActiveRecord::Base.connection.current_database
config.before(:each) do
db_name = ActiveRecord::Base.connection.current_database
raise "WARNING WRONG DATABASE" unless db_name.include?("_test")
end
if ENV["DOCS"]