Class: KlassNameType

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/klass_name_type.rb

Class Method Summary collapse

Class Method Details

.create_knt_tableObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/klass_name_type.rb', line 9

def self.create_knt_table
  begin
    unless table_exists?
      puts "klass_name_types table does not exist, so we're going to create the table."
      ActiveRecord::Base.connection.create_table(:klass_name_types) do |t|
        t.column :name, :string, :limit => 100, :null => false, :unique => true
      end
    end
  rescue Exception => e
  end
end