Class: Gitlab::ClickHouse::MigrationGenerator

Inherits:
ActiveRecord::Generators::MigrationGenerator
  • Object
show all
Defined in:
lib/generators/gitlab/click_house/migration_generator.rb

Direct Known Subclasses

PostDeploymentMigrationGenerator

Instance Method Summary collapse

Instance Method Details

#create_migration_fileObject

Override create_migration_file to ensure custom template is used



27
28
29
30
31
# File 'lib/generators/gitlab/click_house/migration_generator.rb', line 27

def create_migration_file
  set_local_assigns!
  validate_file_name!
  migration_template "migration.rb.template", File.join(db_migrate_path, "#{file_name}.rb")
end

#db_migrate_pathObject



22
23
24
# File 'lib/generators/gitlab/click_house/migration_generator.rb', line 22

def db_migrate_path
  'db/click_house/migrate/main'
end