Class: ActiveRecord::ConnectionAdapters::SQLite3::SchemaDumper
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
ActiveRecord::ConnectionAdapters::SchemaDumper
|
Defined in: | activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb |
Constant Summary
Class Attribute Summary
::ActiveRecord::SchemaDumper
- Inherited
.chk_ignore_pattern | Specify a custom regular expression matching check constraints which name should not be dumped to db/schema.rb. |
.excl_ignore_pattern | Specify a custom regular expression matching exclusion constraints which name should not be dumped to db/schema.rb. |
.fk_ignore_pattern | Specify a custom regular expression matching foreign keys which name should not be dumped to db/schema.rb. |
.ignore_tables | A list of tables which should not be dumped to the schema. |
.unique_ignore_pattern | Specify a custom regular expression matching unique constraints which name should not be dumped to db/schema.rb. |
Class Method Summary
::ActiveRecord::ConnectionAdapters::SchemaDumper
- Inherited
::ActiveRecord::SchemaDumper
- Inherited
Instance Attribute Summary
::ActiveRecord::SchemaDumper
- Inherited
Instance Method Summary
- #default_primary_key?(column) ⇒ Boolean private
- #explicit_primary_key_default?(column) ⇒ Boolean private
- #extract_expression_for_virtual_column(column) private
- #prepare_column_options(column) private
::ActiveRecord::ConnectionAdapters::SchemaDumper
- Inherited
::ActiveRecord::SchemaDumper
- Inherited
#dump, #check_constraints_in_create, #check_parts, #define_params, | |
#extensions | extensions are only supported by |
#foreign_keys, #format_colspec, #format_index_parts, #format_options, | |
#formatted_version | turns 20170404131909 into “2017_04_04_131909”. |
#header, #ignored?, #index_parts, | |
#indexes | Keep it for indexing materialized views. |
#indexes_in_create, #remove_prefix_and_suffix, | |
#schemas | schemas are only supported by |
#table, #tables, #trailer, | |
#types | (enum) types are only supported by |
Constructor Details
This class inherits a constructor from ActiveRecord::SchemaDumper
Instance Method Details
#default_primary_key?(column) ⇒ Boolean
(private)
# File 'activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb', line 8
def default_primary_key?(column) schema_type(column) == :integer end
#explicit_primary_key_default?(column) ⇒ Boolean
(private)
# File 'activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb', line 12
def explicit_primary_key_default?(column) column.bigint? end
#extract_expression_for_virtual_column(column) (private)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb', line 28
def extract_expression_for_virtual_column(column) column.default_function.inspect end
#prepare_column_options(column) (private)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/sqlite3/schema_dumper.rb', line 16
def (column) spec = super if @connection.supports_virtual_columns? && column.virtual? spec[:as] = extract_expression_for_virtual_column(column) spec[:stored] = column.virtual_stored? spec = { type: schema_type(column).inspect }.merge!(spec) end spec end