Class: ClickhouseRuby::ActiveRecord::SchemaDumper
- Inherits:
-
ActiveRecord::SchemaDumper
- Object
- ActiveRecord::SchemaDumper
- ClickhouseRuby::ActiveRecord::SchemaDumper
- Defined in:
- lib/clickhouse_ruby/active_record/schema_dumper.rb
Overview
Custom schema dumper for ClickHouse databases
Extends ActiveRecord::SchemaDumper to properly dump ClickHouse-specific schema elements like engines, ORDER BY, PARTITION BY, and SETTINGS.
Class Method Summary collapse
-
.dump(connection = ::ActiveRecord::Base.connection, stream = $stdout, _config = nil) ⇒ void
Dump the schema to a stream.
-
.generate_options ⇒ Hash
Generate options for the dumper.
Class Method Details
.dump(connection = ::ActiveRecord::Base.connection, stream = $stdout, _config = nil) ⇒ void
This method returns an undefined value.
Dump the schema to a stream
28 29 30 31 |
# File 'lib/clickhouse_ruby/active_record/schema_dumper.rb', line 28 def self.dump(connection = ::ActiveRecord::Base.connection, stream = $stdout, _config = nil) new(connection, ).dump(stream) stream end |
.generate_options ⇒ Hash
Generate options for the dumper
36 37 38 39 40 41 |
# File 'lib/clickhouse_ruby/active_record/schema_dumper.rb', line 36 def self. { table_name_prefix: ::ActiveRecord::Base.table_name_prefix, table_name_suffix: ::ActiveRecord::Base.table_name_suffix, } end |