Class: CipherBureau::CreateMigrationGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- CipherBureau::CreateMigrationGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/cipher_bureau/create_migration_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
28 29 30 31 32 |
# File 'lib/generators/cipher_bureau/create_migration_generator.rb', line 28 def self.next_migration_number(path) @v ||= 0 @v += 1 Time.now.utc.strftime("%Y%m%d%H%M%S") + "#{@v}" end |
Instance Method Details
#create_table_file ⇒ Object
35 36 37 38 |
# File 'lib/generators/cipher_bureau/create_migration_generator.rb', line 35 def create_table_file migration_template "create_cipher_bureau_dictionaries.rb", "db/migrate/create_cipher_bureau_dictionaries.rb" migration_template "create_cipher_bureau_statistics.rb", "db/migrate/create_cipher_bureau_statistics.rb" end |