Class: Mobility::BackendGenerators::TableBackend

Inherits:
Base
  • Object
show all
Defined in:
lib/rails/generators/mobility/backend_generators/table_backend.rb

Instance Method Summary collapse

Methods inherited from Base

#backend, next_migration_number

Methods included from ActiveRecordMigrationCompatibility

#activerecord_migration_class

Instance Method Details

#create_migration_fileObject



9
10
11
12
13
14
15
# File 'lib/rails/generators/mobility/backend_generators/table_backend.rb', line 9

def create_migration_file
  if data_source_exists? && !self.class.migration_exists?(migration_dir, migration_file)
    migration_template "#{backend}_migration.rb", "db/migrate/#{migration_file}.rb"
  else
    super
  end
end