Run migrations

pull/1150/head
Rick Carlino 2019-04-12 17:55:03 -05:00
parent 4b18163fbf
commit 11f89fa111
2 changed files with 11 additions and 8 deletions

View File

@ -13,14 +13,14 @@ module Devices
def execute
merge_default_values
device = Device.create!({name: "Farmbot"}.merge(inputs.except(:user)))
# TODO: This is a really, really, really old
# no-longer-relevant legacy features back
# when we were using MongoDB. This can be
# safely removed now. - RC 11-APR-19
Enigmas::Create.run!(device: device,
problem_tag: Enigma::SEED_DATA)
ActiveRecord::Base.transaction do
# TODO: This is a really, really, really old
# no-longer-relevant legacy features back
# when we were using MongoDB. This can be
# safely removed now. - RC 11-APR-19
old_device = user.device
user.update_attributes!(device_id: device.id) # Detach from old one.
# Remove userless devices.

View File

@ -420,7 +420,7 @@ CREATE TABLE public.fbos_configs (
device_id bigint,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
auto_sync boolean DEFAULT false,
auto_sync boolean DEFAULT true,
beta_opt_in boolean DEFAULT false,
disable_factory_reset boolean DEFAULT false,
firmware_input_log boolean DEFAULT false,
@ -1501,13 +1501,14 @@ CREATE TABLE public.web_app_configs (
photo_filter_end character varying,
discard_unsaved boolean DEFAULT false,
xy_swap boolean DEFAULT false,
home_button_homing boolean DEFAULT false,
home_button_homing boolean DEFAULT true,
show_motor_plot boolean DEFAULT false,
show_historic_points boolean DEFAULT false,
show_sensor_readings boolean DEFAULT false,
show_dev_menu boolean DEFAULT false,
internal_use text,
time_format_24_hour boolean DEFAULT false
time_format_24_hour boolean DEFAULT false,
show_pins boolean DEFAULT false
);
@ -2886,6 +2887,8 @@ INSERT INTO "schema_migrations" (version) VALUES
('20190212215842'),
('20190307205648'),
('20190401212119'),
('20190411152319');
('20190411152319'),
('20190411171401'),
('20190411222900');