blob: 7cb4bccb23c4c1b037da3b9b7093e3a22a6ce774 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
require 'rails/generators'
module Rails
class PostDeploymentMigrationGenerator < Rails::Generators::NamedBase
def create_migration_file
timestamp = Time.now.strftime('%Y%m%d%H%I%S')
template "migration.rb", "db/post_migrate/#{timestamp}_#{file_name}.rb"
end
def migration_class_name
file_name.camelize
end
end
end
|