Class: MonarchMigrate::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ActiveRecord::Generators::Migration
Defined in:
lib/generators/monarch_migrate/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_monarch_migrate_migrationObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/generators/monarch_migrate/install/install_generator.rb', line 13

def create_monarch_migrate_migration
  return if migration_exists?
  return if migration_table_exists?

  migration_template(
    "create_data_migration_records.rb.erb",
    "#{db_migrate_path}/create_data_migration_records.rb",
    migration_version: migration_version
  )
end