Module: Torque::PostgreSQL::Adapter::SchemaOverrides
- Included in:
- Torque::PostgreSQL::Adapter
- Defined in:
- lib/torque/postgresql/adapter/schema_overrides.rb,
sig/torque/postgresql/adapter/schema_overrides.rbs
Instance Method Summary collapse
- #add_column {|arg0| ... } ⇒ Object
- #add_columns {|arg0| ... } ⇒ Object
- #add_foreign_key {|arg0| ... } ⇒ Object
- #add_index {|arg0| ... } ⇒ Object
- #add_timestamps {|arg0| ... } ⇒ Object
- #bulk_change_table {|arg0| ... } ⇒ Object
- #change_column {|arg0| ... } ⇒ Object
- #change_column_comment {|arg0| ... } ⇒ Object
- #change_column_default {|arg0| ... } ⇒ Object
- #change_column_null {|arg0| ... } ⇒ Object
- #change_table {|arg0| ... } ⇒ Object
- #change_table_comment {|arg0| ... } ⇒ Object
- #column_exists? {|arg0| ... } ⇒ Object
- #columns {|arg0| ... } ⇒ Object
- #create_table {|arg0| ... } ⇒ Object
- #drop_table(*table_names, **options) ⇒ Object
- #foreign_key_exists? {|arg0| ... } ⇒ Object
- #foreign_keys {|arg0| ... } ⇒ Object
- #index_exists? {|arg0| ... } ⇒ Object
- #index_name_exists? {|arg0| ... } ⇒ Object
- #indexes {|arg0| ... } ⇒ Object
- #primary_key {|arg0| ... } ⇒ Object
-
#quote_table_name(name) ⇒ String
This adds better support for handling the quotation of table names.
- #remove_column {|arg0| ... } ⇒ Object
- #remove_columns {|arg0| ... } ⇒ Object
- #remove_foreign_key {|arg0| ... } ⇒ Object
- #remove_index {|arg0| ... } ⇒ Object
- #remove_timestamps {|arg0| ... } ⇒ Object
- #rename_column {|arg0| ... } ⇒ Object
- #rename_index {|arg0| ... } ⇒ Object
- #rename_table {|arg0| ... } ⇒ Object
- #table_exists? {|arg0| ... } ⇒ Object
Instance Method Details
#add_column {|arg0| ... } ⇒ Object
14 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 14
def add_column: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#add_columns {|arg0| ... } ⇒ Object
15 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 15
def add_columns: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#add_foreign_key {|arg0| ... } ⇒ Object
33 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 33
def add_foreign_key: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#add_index {|arg0| ... } ⇒ Object
22 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 22
def add_index: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#add_timestamps {|arg0| ... } ⇒ Object
27 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 27
def add_timestamps: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#bulk_change_table {|arg0| ... } ⇒ Object
31 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 31
def bulk_change_table: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#change_column {|arg0| ... } ⇒ Object
18 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 18
def change_column: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#change_column_comment {|arg0| ... } ⇒ Object
30 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 30
def change_column_comment: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#change_column_default {|arg0| ... } ⇒ Object
19 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 19
def change_column_default: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#change_column_null {|arg0| ... } ⇒ Object
20 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 20
def change_column_null: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#change_table {|arg0| ... } ⇒ Object
13 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 13
def change_table: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#change_table_comment {|arg0| ... } ⇒ Object
29 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 29
def change_table_comment: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#column_exists? {|arg0| ... } ⇒ Object
10 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 10
def column_exists?: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#columns {|arg0| ... } ⇒ Object
9 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 9
def columns: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#create_table {|arg0| ... } ⇒ Object
12 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 12
def create_table: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#drop_table(*table_names, **options) ⇒ Object
30 31 32 33 |
# File 'lib/torque/postgresql/adapter/schema_overrides.rb', line 30 def drop_table(*table_names, **) table_names = table_names.map { |name| sanitize_name_with_schema(name, .dup) } super(*table_names, **) end |
#foreign_key_exists? {|arg0| ... } ⇒ Object
35 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 35
def foreign_key_exists?: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#foreign_keys {|arg0| ... } ⇒ Object
26 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 26
def foreign_keys: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#index_exists? {|arg0| ... } ⇒ Object
8 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 8
def index_exists?: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#index_name_exists? {|arg0| ... } ⇒ Object
25 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 25
def index_name_exists?: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#indexes {|arg0| ... } ⇒ Object
7 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 7
def indexes: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#primary_key {|arg0| ... } ⇒ Object
11 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 11
def primary_key: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#quote_table_name(name) ⇒ String
This adds better support for handling the quotation of table names
8 9 10 11 12 |
# File 'lib/torque/postgresql/adapter/schema_overrides.rb', line 8 def quote_table_name(name) ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting::QUOTED_TABLE_NAMES.then do |m| m[name] ||= quote_identifier_name(name) end end |
#remove_column {|arg0| ... } ⇒ Object
17 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 17
def remove_column: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#remove_columns {|arg0| ... } ⇒ Object
16 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 16
def remove_columns: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#remove_foreign_key {|arg0| ... } ⇒ Object
34 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 34
def remove_foreign_key: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#remove_index {|arg0| ... } ⇒ Object
23 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 23
def remove_index: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#remove_timestamps {|arg0| ... } ⇒ Object
28 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 28
def remove_timestamps: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#rename_column {|arg0| ... } ⇒ Object
21 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 21
def rename_column: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#rename_index {|arg0| ... } ⇒ Object
24 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 24
def rename_index: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#rename_table {|arg0| ... } ⇒ Object
32 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 32
def rename_table: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|
#table_exists? {|arg0| ... } ⇒ Object
6 |
# File 'sig/torque/postgresql/adapter/schema_overrides.rbs', line 6
def table_exists?: (table_ref table_name, *untyped args, **untyped options) ?{ (?) -> untyped } -> untyped
|