Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_table_definition and add_column take keyword arguments #1942

Merged
merged 1 commit into from
Nov 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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