Sha256: 44b672a9a16f86925246c99783a53eb99eeb969db61a5d9b0b409d9323027be9

Contents?: true

Size: 538 Bytes

Versions: 135

Compression:

Stored size: 538 Bytes

Contents

module Scrivito
  module Generators
    class MigrationGenerator < ::Rails::Generators::NamedBase
      include ::Rails::Generators::Migration

      source_root File.expand_path('../templates', __FILE__)

      def self.next_migration_number(dirname)
        Scrivito::Migration.next_migration_number(current_migration_number(dirname))
      end

      def generate_migration
        migration_template 'migration.erb',
          File.join(Scrivito::Configuration.migration_path, "#{file_name}_migration.rb")
      end
    end
  end
end

Version data entries

135 entries across 135 versions & 1 rubygems

Version Path
scrivito_sdk-1.18.0 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.18.0.rc1 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.17.0 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.17.0.rc3 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.17.0.rc2 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.17.0.rc1 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.16.0 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.16.0.rc2 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.16.0.rc1 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.15.0 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.15.0.rc2 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.15.0.rc1 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.14.0 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.14.0.rc3 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.14.0.rc2 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.14.0.rc1 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.13.0 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.13.0.rc2 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.13.0.rc1 lib/generators/scrivito/migration/migration_generator.rb
scrivito_sdk-1.12.0 lib/generators/scrivito/migration/migration_generator.rb