klass_name_types 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ class KlassNameType < ActiveRecord::Base
11
11
  unless table_exists?
12
12
  puts "klass_name_types table does not exist, so we're going to create the table."
13
13
  ActiveRecord::Base.connection.create_table(:klass_name_types) do |t|
14
- t.column :name, :string, :limit => 100, :null => false
14
+ t.column :name, :string, :limit => 100, :null => false, :unique => true
15
15
  end
16
16
  end
17
17
  rescue Exception => e
@@ -9,8 +9,10 @@ class << ActiveRecord::Base
9
9
  unless KlassNameType.table_exists?
10
10
  KlassNameType.create_knt_table
11
11
  end
12
- if KlassNameType.create(:name => c_name)
13
- KlassNameType.reload_constants!
12
+ unless child.is_a? ActiveRecord::Migration
13
+ if KlassNameType.create(:name => c_name)
14
+ KlassNameType.reload_constants!
15
+ end
14
16
  end
15
17
  end
16
18
  rescue Exception => e
@@ -2,4 +2,4 @@
2
2
  gem_name: klass_name_types
3
3
  package: klass_name_types
4
4
  project: magrathea
5
- version: 1.0.1
5
+ version: 1.0.2
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: klass_name_types
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.1
7
- date: 2007-09-17 00:00:00 -04:00
6
+ version: 1.0.2
7
+ date: 2007-09-20 00:00:00 -04:00
8
8
  summary: klass_name_types
9
9
  require_paths:
10
10
  - lib