From d730cd9260b32f8c3e447ad68217267ed6a4e81b Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Sun, 12 Apr 2020 10:24:17 -0500 Subject: [PATCH 1/4] Bump image limit from 100 to 450 --- db/migrate/20180325220047_make_defaul_device_name_farmbot.rb | 1 - db/migrate/20200412152208_update_max_image_count.rb | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20200412152208_update_max_image_count.rb diff --git a/db/migrate/20180325220047_make_defaul_device_name_farmbot.rb b/db/migrate/20180325220047_make_defaul_device_name_farmbot.rb index 61f4d5362..4f3a98387 100644 --- a/db/migrate/20180325220047_make_defaul_device_name_farmbot.rb +++ b/db/migrate/20180325220047_make_defaul_device_name_farmbot.rb @@ -1,5 +1,4 @@ class MakeDefaulDeviceNameFarmbot < ActiveRecord::Migration[5.1] - def change change_column_default(:devices, :name, "Farmbot") end diff --git a/db/migrate/20200412152208_update_max_image_count.rb b/db/migrate/20200412152208_update_max_image_count.rb new file mode 100644 index 000000000..b2b450582 --- /dev/null +++ b/db/migrate/20200412152208_update_max_image_count.rb @@ -0,0 +1,5 @@ +class UpdateMaxImageCount < ActiveRecord::Migration[6.0] + def change + change_column_default(:images, :max_images_count, 450) + end +end From dd6a43d901a84400c54e869559759785c471efeb Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Sun, 12 Apr 2020 10:33:49 -0500 Subject: [PATCH 2/4] Dep updates --- Gemfile | 2 +- Gemfile.lock | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index 22a2c8929..9758904bd 100755 --- a/Gemfile +++ b/Gemfile @@ -35,7 +35,7 @@ group :development, :test do gem "hashdiff" gem "pry-rails" gem "pry" - gem "rspec-rails", "4.0.0.beta3" + gem "rspec-rails" gem "rspec" gem 'rspec_junit_formatter' gem "simplecov" diff --git a/Gemfile.lock b/Gemfile.lock index a2ee97992..6403e260f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,11 +69,11 @@ GEM zeitwerk (~> 2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - amq-protocol (2.3.0) + amq-protocol (2.3.1) bcrypt (3.1.13) builder (3.2.4) - bunny (2.14.4) - amq-protocol (~> 2.3, >= 2.3.0) + bunny (2.15.0) + amq-protocol (~> 2.3, >= 2.3.1) case_transform (0.2) activesupport climate_control (0.2.0) @@ -104,12 +104,12 @@ GEM activerecord (>= 4.2, < 7) docile (1.3.2) erubi (1.9.0) - factory_bot (5.1.1) + factory_bot (5.1.2) activesupport (>= 4.2.0) factory_bot_rails (5.1.1) factory_bot (~> 5.1.0) railties (>= 4.2.0) - faker (2.10.2) + faker (2.11.0) i18n (>= 1.6, < 2) faraday (0.17.3) multipart-post (>= 1.2, < 3) @@ -167,7 +167,7 @@ GEM activerecord kaminari-core (= 1.2.0) kaminari-core (1.2.0) - loofah (2.4.0) + loofah (2.5.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -175,14 +175,14 @@ GEM marcel (0.3.3) mimemagic (~> 0.3.2) memoist (0.16.2) - method_source (0.9.2) + method_source (1.0.0) mimemagic (0.3.4) mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.0) multi_json (1.13.1) multipart-post (2.1.1) - mutations (0.9.0) + mutations (0.9.1) activesupport nio4r (2.5.2) nokogiri (1.10.9) @@ -193,9 +193,9 @@ GEM rack rake (>= 0.8.1) pg (1.2.3) - pry (0.12.2) - coderay (~> 1.1.0) - method_source (~> 0.9.0) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.3) @@ -267,14 +267,14 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-rails (4.0.0.beta3) + rspec-rails (4.0.0) actionpack (>= 4.2) activesupport (>= 4.2) railties (>= 4.2) - rspec-core (~> 3.8) - rspec-expectations (~> 3.8) - rspec-mocks (~> 3.8) - rspec-support (~> 3.8) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) rspec-support (3.9.2) rspec_junit_formatter (0.4.1) rspec-core (>= 2, < 4, != 2.12.0) @@ -300,7 +300,7 @@ GEM sprockets (>= 3.0.0) thor (1.0.1) thread_safe (0.3.6) - tzinfo (1.2.6) + tzinfo (1.2.7) thread_safe (~> 0.1) uber (0.1.0) url (0.3.2) @@ -348,7 +348,7 @@ DEPENDENCIES request_store rollbar rspec - rspec-rails (= 4.0.0.beta3) + rspec-rails rspec_junit_formatter scenic secure_headers From bfe4df68a8d2a9a64fa1b954f0287fba2a5df69a Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Sun, 12 Apr 2020 10:41:53 -0500 Subject: [PATCH 3/4] Fix typo in migration --- db/migrate/20200412152208_update_max_image_count.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20200412152208_update_max_image_count.rb b/db/migrate/20200412152208_update_max_image_count.rb index b2b450582..39a6c9866 100644 --- a/db/migrate/20200412152208_update_max_image_count.rb +++ b/db/migrate/20200412152208_update_max_image_count.rb @@ -1,5 +1,5 @@ class UpdateMaxImageCount < ActiveRecord::Migration[6.0] def change - change_column_default(:images, :max_images_count, 450) + change_column_default(:devices, :max_images_count, 450) end end From 91d86bad0c729012e31adcebe224d02a3ae29f5a Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Sun, 12 Apr 2020 10:55:08 -0500 Subject: [PATCH 4/4] Update structure.sql --- db/structure.sql | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/db/structure.sql b/db/structure.sql index 0a58a1615..64c775cad 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -150,8 +150,8 @@ ALTER SEQUENCE public.alerts_id_seq OWNED BY public.alerts.id; CREATE TABLE public.ar_internal_metadata ( key character varying NOT NULL, value character varying, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL + created_at timestamp(6) without time zone NOT NULL, + updated_at timestamp(6) without time zone NOT NULL ); @@ -262,7 +262,7 @@ CREATE TABLE public.devices ( id integer NOT NULL, name character varying DEFAULT 'FarmBot'::character varying, max_log_count integer DEFAULT 1000, - max_images_count integer DEFAULT 100, + max_images_count integer DEFAULT 450, timezone character varying(280), last_saw_api timestamp without time zone, last_saw_mq timestamp without time zone, @@ -1364,7 +1364,7 @@ CREATE VIEW public.resource_update_steps AS edge_nodes.kind, edge_nodes.value FROM public.edge_nodes - WHERE (((edge_nodes.kind)::text = 'resource_type'::text) AND ((edge_nodes.value)::text = ANY (ARRAY[('"GenericPointer"'::character varying)::text, ('"ToolSlot"'::character varying)::text, ('"Plant"'::character varying)::text]))) + WHERE (((edge_nodes.kind)::text = 'resource_type'::text) AND ((edge_nodes.value)::text = ANY ((ARRAY['"GenericPointer"'::character varying, '"ToolSlot"'::character varying, '"Plant"'::character varying])::text[]))) ), resource_id AS ( SELECT edge_nodes.primary_node_id, edge_nodes.kind, @@ -1644,8 +1644,7 @@ CREATE TABLE public.users ( agreed_to_terms_at timestamp without time zone, confirmation_sent_at timestamp without time zone, unconfirmed_email character varying, - inactivity_warning_sent_at timestamp without time zone, - inactivity_warning_count integer + inactivity_warning_sent_at timestamp without time zone ); @@ -1729,7 +1728,9 @@ CREATE TABLE public.web_app_configs ( confirm_sequence_deletion boolean DEFAULT true, discard_unsaved_sequences boolean DEFAULT false, user_interface_read_only_mode boolean DEFAULT false, - assertion_log integer DEFAULT 1 + assertion_log integer DEFAULT 1, + show_zones boolean DEFAULT false, + show_weeds boolean DEFAULT false ); @@ -3376,6 +3377,9 @@ INSERT INTO "schema_migrations" (version) VALUES ('20191219212755'), ('20191220010646'), ('20200116140201'), -('20200204192005'); +('20200204192005'), +('20200204230135'), +('20200323235926'), +('20200412152208');