Sha256: 4a2b12e9da5cadd6eee2073efb1d58dbc176a23c86a050126ffe8b3ea5fd10aa
Contents?: true
Size: 478 Bytes
Versions: 6
Compression:
Stored size: 478 Bytes
Contents
module Ponytail class Schema def tables table_names.sort.map { |t| Table.new(t) } end private def table_names ActiveRecord::Base.connection.tables.delete_if { |t| t == 'schema_migrations' } end end class Table attr_reader :name def initialize(name=nil) @name = name end def columns @columns ||= ActiveRecord::Base.connection.columns(name) end def ==(other) name == other.name end end end
Version data entries
6 entries across 6 versions & 1 rubygems