Class: Pu::Gem::ActualDbSchemaGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
PlutoniumGenerators::Generator
Defined in:
lib/generators/pu/gem/actual_db_schema/actual_db_schema_generator.rb

Overview

Installs actual_db_schema, which tracks phantom migrations across git branches so switching branches with diverging migration sets doesn’t leave db/schema.rb out of sync.

github.com/share-group/actual_db_schema

Instance Method Summary collapse

Methods included from PlutoniumGenerators::Generator

derive_association_name, find_shared_namespace, included

Methods included from PlutoniumGenerators::Concerns::Logger

#debug, #error, #exception, #info, #success, #warn

Methods included from PlutoniumGenerators::Concerns::Config

#read_config, #write_config

Instance Method Details

#startObject



17
18
19
20
21
# File 'lib/generators/pu/gem/actual_db_schema/actual_db_schema_generator.rb', line 17

def start
  bundle "actual_db_schema", group: %i[development test]
rescue => e
  exception "#{self.class} failed:", e
end