Skip to content

Commit

Permalink
create_table_definition and add_column take keyword arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Nov 7, 2019
1 parent cb1125a commit 13abef9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ def add_reference(table_name, *args)
OracleEnhanced::ReferenceDefinition.new(*args).add_to(update_table_definition(table_name, self))
end

def add_column(table_name, column_name, type, options = {}) #:nodoc:
def add_column(table_name, column_name, type, **options) #:nodoc:
type = aliased_types(type.to_s, type)
at = create_alter_table table_name
at.add_column(column_name, type, options)
at.add_column(column_name, type, **options)
add_column_sql = schema_creation.accept at
add_column_sql << tablespace_for((type_to_sql(type).downcase.to_sym), nil, table_name, column_name)
execute add_column_sql
Expand Down Expand Up @@ -624,8 +624,8 @@ def schema_creation
OracleEnhanced::SchemaCreation.new self
end

def create_table_definition(*args)
OracleEnhanced::TableDefinition.new(self, *args)
def create_table_definition(*args, **options)
OracleEnhanced::TableDefinition.new(self, *args, **options)
end

def new_column_from_field(table_name, field)
Expand Down

0 comments on commit 13abef9

Please sign in to comment.