blob: d1f4d4c41b343e115e520b2be7c53c51b0915a6e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
class MigrationGenerator < Rails::Generator::NamedBase
def manifest
record do |m|
m.directory File.join('db/migrate')
next_migration_number = Dir.glob("db/migrate/[0-9]*.*").size + 1
m.template 'migration.rb', File.join('db/migrate', "#{next_migration_number}_#{file_name}.rb")
end
end
end
|