Intervene on change_table as well as create_table
This commit is contained in:
parent
7d288244b2
commit
da6342779b
@ -30,6 +30,19 @@ class << t
|
||||
end
|
||||
end
|
||||
|
||||
def change_table(table_name, options = {})
|
||||
if block_given?
|
||||
super(table_name, options) do |t|
|
||||
class << t
|
||||
prepend TableDefinition
|
||||
end
|
||||
yield t
|
||||
end
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def add_reference(*, **options)
|
||||
options[:index] ||= false
|
||||
super
|
||||
|
Loading…
Reference in New Issue
Block a user