mystic 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7628f25056343c8a5c5d6e21948356804b06c894
4
- data.tar.gz: e0572740b6528e68a3272715dcf1f8d49940c4d2
3
+ metadata.gz: 8145f377dd3a5bead7ebfecc87e55804af4992a8
4
+ data.tar.gz: f187a9d25f1d811a12c43326407b0cf6fb6c3661
5
5
  SHA512:
6
- metadata.gz: 4916038f9234491af9b051f1c8094120f64462c59bdcfc09f68e9116db7c5f2577d5ad8da9d23dc92fa3d13c5660bd304b8ed177b171eaebf655f87f2407d5ce
7
- data.tar.gz: eb2328c47bca739a6c52ecdf9a04af5bb470bb7401d377fed8c865c8964bb9b81a637eec11aa3dff6d24f79fb76b4b704b60dc3f61e4b9f2e93ba6f0b2d9b3c0
6
+ metadata.gz: 94b02be8857f3dd2ff99f2820a7e8e456cf4e4738348114f2fca0f9081250e97d2ed9ca090d66d3c3f9948ee2c034aaa6eb8db715a313c9d09ff6691f0ee4478
7
+ data.tar.gz: 21ca8193be269c8619797450cb0c571dc3064163f2cfa2a3dda3a7280c87d4bd6ac91f7c266355a22800f07359aec8f9d226254969e46479aeed6294f8ed271b
@@ -72,7 +72,7 @@ module Mystic
72
72
  end
73
73
 
74
74
  drop_table do |obj|
75
- "DROP TABLE #{obj.table_name}"
75
+ "DROP TABLE #{obj.table_name} #{obj.cascade? ? "CASCADE" : "RESTRICT" }"
76
76
  end
77
77
 
78
78
  rename_table do |obj|
@@ -66,10 +66,11 @@ module Mystic
66
66
  execute table
67
67
  end
68
68
 
69
- def drop_table(name)
69
+ def drop_table(name, opts={})
70
70
  irreversible!
71
71
  execute Mystic::SQL::Operation.drop_table(
72
- :table_name => name.to_s
72
+ :table_name => name.to_s,
73
+ :cascade? => opts[:cascade]
73
74
  )
74
75
  end
75
76
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mystic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathaniel Symer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-07 00:00:00.000000000 Z
11
+ date: 2014-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: densify