# File lib/dm-migrations/sql/table_creator.rb, line 24 def column(name, type, opts = {}) @columns << Column.new(@adapter, name, type, opts) end
A helper for using the native NOW() SQL function in a default
# File lib/dm-migrations/sql/table_creator.rb, line 33 def now SqlExpr.new('NOW()') end
# File lib/dm-migrations/sql/table_creator.rb, line 20 def quoted_table_name @adapter.send(:quote_name, table_name) end
# File lib/dm-migrations/sql/table_creator.rb, line 28 def to_sql "CREATE TABLE #{quoted_table_name} (#{@columns.map{ |c| c.to_sql }.join(', ')})#{@adapter.table_options(@opts)}" end
A helper for using the native UUID() SQL function in a default
# File lib/dm-migrations/sql/table_creator.rb, line 38 def uuid SqlExpr.new('UUID()') end
Generated with the Darkfish Rdoc Generator 2.