Added docs for TableDefinition #coloumns & #remove_column [ci skip]
This commit is contained in:
parent
a293812bff
commit
c351a823ad
@ -214,6 +214,7 @@ def initialize(types, name, temporary, options, as = nil)
|
||||
@name = name
|
||||
end
|
||||
|
||||
# Returns an array of ColumnDefinitions for the columns of the table.
|
||||
def columns; @columns_hash.values; end
|
||||
|
||||
# Returns a ColumnDefinition for the column with name +name+.
|
||||
@ -369,6 +370,8 @@ def column(name, type, options = {})
|
||||
self
|
||||
end
|
||||
|
||||
# remove the column +name+ from the table.
|
||||
# remove_column(:account_id)
|
||||
def remove_column(name)
|
||||
@columns_hash.delete name.to_s
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user