Responsible for generating migration files for the appropriate ORM component.
Creates the migration file within a Padrino project.
# File lib/padrino-gen/generators/migration.rb, line 27 def create_migration validate_namespace name self.destination_root = options[:root] if in_app_root? self.behavior = :revoke if options[:destroy] if include_component_module_for(:orm) create_migration_file(name, name, columns) else say '<= You need an ORM adapter for run this generator. Sorry!' raise SystemExit end else say 'You are not at the root of a Padrino application! (config/boot.rb not found)' end end
# File lib/padrino-gen/generators/migration.rb, line 9 def self.source_root; File.expand_path(File.dirname(__FILE__)); end