ensured_schema 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ensured_schema/ensured_table.rb +0 -5
- data/lib/ensured_schema/table.rb +10 -0
- data/lib/ensured_schema/version.rb +1 -1
- data/lib/ensured_schema.rb +12 -1
- metadata +5 -4
@@ -2,11 +2,6 @@ module ActiveRecord
|
|
2
2
|
module ConnectionAdapters
|
3
3
|
class EnsuredTable < Table
|
4
4
|
|
5
|
-
def column_exists?(column_name, type = nil, options = {})
|
6
|
-
#debugger
|
7
|
-
@base.column_exists?(@table_name, column_name, type, options)
|
8
|
-
end
|
9
|
-
|
10
5
|
%w( string text integer float decimal datetime timestamp time date binary boolean ).each do |column_type|
|
11
6
|
class_eval <<-EOV
|
12
7
|
def #{column_type}(*args) # def string(*args)
|
data/lib/ensured_schema.rb
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
require 'ensured_schema/column'
|
2
2
|
require 'ensured_schema/mysql_column'
|
3
3
|
require 'ensured_schema/schema_statements'
|
4
|
+
require 'ensured_schema/table'
|
4
5
|
require 'ensured_schema/ensured_table'
|
5
|
-
require 'ensured_schema/schema'
|
6
|
+
require 'ensured_schema/schema'
|
7
|
+
|
8
|
+
# module ActiveRecord
|
9
|
+
# module ConnectionAdapters
|
10
|
+
# class AbstractAdapter
|
11
|
+
# def table_exists?(table_name)
|
12
|
+
# tables.map(&:downcase).include?(table_name.to_s.downcase)
|
13
|
+
# end
|
14
|
+
# end
|
15
|
+
# end
|
16
|
+
# end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ensured_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Conley
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-10 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- lib/ensured_schema/mysql_column.rb
|
72
72
|
- lib/ensured_schema/schema.rb
|
73
73
|
- lib/ensured_schema/schema_statements.rb
|
74
|
+
- lib/ensured_schema/table.rb
|
74
75
|
- lib/ensured_schema/version.rb
|
75
76
|
- test/cases/ensured_schema_test.rb
|
76
77
|
- test/cases/helper.rb
|