Class: ClickhouseRuby::Generators::MigrationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- ClickhouseRuby::Generators::MigrationGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/clickhouse_ruby/active_record/generators/migration_generator.rb
Overview
Rails generator for creating ClickHouse migrations
This generator creates migration files with ClickHouse-specific options like ENGINE, ORDER BY, PARTITION BY, and PRIMARY KEY.
Instance Method Summary collapse
-
#create_migration_file ⇒ void
Generate the migration file.
Instance Method Details
#create_migration_file ⇒ void
This method returns an undefined value.
Generate the migration file
57 58 59 60 61 62 |
# File 'lib/clickhouse_ruby/active_record/generators/migration_generator.rb', line 57 def create_migration_file set_local_assigns! validate_engine! migration_template "migration.rb.tt", File.join(db_migrate_path, "#{file_name}.rb") end |