cronjobs 0.1.0 → 4.0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -19
- data/lib/cronjobs/definitions.rb +23 -0
- data/lib/cronjobs/proxy.rb +1 -1
- data/lib/cronjobs/railtie.rb +5 -1
- data/lib/cronjobs/version.rb +3 -1
- data/lib/cronjobs.rb +19 -27
- data/lib/generators/cronjobs/install/install_generator.rb +15 -0
- data/lib/generators/cronjobs/{templates/definitions.rb → install/templates/configuration.rb} +0 -0
- data/lib/tasks/cronjobs.rake +2 -2
- data/test/{cronjobs_test.rb → definition_test.rb} +5 -3
- data/test/dummy/app/views/layouts/application.html.erb +9 -11
- data/test/dummy/bin/bundle +1 -0
- data/test/dummy/bin/rails +1 -0
- data/test/dummy/bin/rake +1 -0
- data/test/dummy/bin/setup +1 -0
- data/test/dummy/config/environments/development.rb +1 -1
- data/test/dummy/config/environments/production.rb +1 -1
- data/test/dummy/config/environments/test.rb +2 -2
- data/test/dummy/config/initializers/wrap_parameters.rb +5 -0
- data/test/dummy/config/secrets.yml +2 -2
- data/test/dummy/log/test.log +34 -1635
- data/test/dummy/public/404.html +57 -63
- data/test/dummy/public/422.html +57 -63
- data/test/dummy/public/500.html +56 -62
- data/test/generator_test.rb +4 -5
- data/test/{tasks_test.rb → task_test.rb} +6 -6
- data/test/test_helper.rb +1 -1
- metadata +10 -11
- data/lib/generators/cronjobs/install_generator.rb +0 -15
- data/test/dummy/log/development.log +0 -35
data/test/dummy/public/404.html
CHANGED
@@ -1,67 +1,61 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
<div class="dialog">
|
60
|
-
<div>
|
61
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
div.dialog {
|
15
|
+
width: 95%;
|
16
|
+
max-width: 33em;
|
17
|
+
margin: 4em auto 0;
|
18
|
+
}
|
19
|
+
div.dialog > div {
|
20
|
+
border: 1px solid #CCC;
|
21
|
+
border-right-color: #999;
|
22
|
+
border-left-color: #999;
|
23
|
+
border-bottom-color: #BBB;
|
24
|
+
border-top: #B00100 solid 4px;
|
25
|
+
border-top-left-radius: 9px;
|
26
|
+
border-top-right-radius: 9px;
|
27
|
+
background-color: white;
|
28
|
+
padding: 7px 12% 0;
|
29
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
30
|
+
}
|
31
|
+
h1 {
|
32
|
+
font-size: 100%;
|
33
|
+
color: #730E15;
|
34
|
+
line-height: 1.5em;
|
35
|
+
}
|
36
|
+
div.dialog > p {
|
37
|
+
margin: 0 0 1em;
|
38
|
+
padding: 1em;
|
39
|
+
background-color: #F7F7F7;
|
40
|
+
border: 1px solid #CCC;
|
41
|
+
border-right-color: #999;
|
42
|
+
border-left-color: #999;
|
43
|
+
border-bottom-color: #999;
|
44
|
+
border-bottom-left-radius: 4px;
|
45
|
+
border-bottom-right-radius: 4px;
|
46
|
+
border-top-color: #DADADA;
|
47
|
+
color: #666;
|
48
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
49
|
+
}
|
50
|
+
</style>
|
51
|
+
</head>
|
52
|
+
<body>
|
53
|
+
<div class="dialog">
|
54
|
+
<div>
|
55
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
56
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
57
|
+
</div>
|
58
|
+
<p>If you are the application owner check the logs for more information.</p>
|
63
59
|
</div>
|
64
|
-
|
65
|
-
</div>
|
66
|
-
</body>
|
60
|
+
</body>
|
67
61
|
</html>
|
data/test/dummy/public/422.html
CHANGED
@@ -1,67 +1,61 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
<div class="dialog">
|
60
|
-
<div>
|
61
|
-
<h1>The change you wanted was rejected.</h1>
|
62
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
div.dialog {
|
15
|
+
width: 95%;
|
16
|
+
max-width: 33em;
|
17
|
+
margin: 4em auto 0;
|
18
|
+
}
|
19
|
+
div.dialog > div {
|
20
|
+
border: 1px solid #CCC;
|
21
|
+
border-right-color: #999;
|
22
|
+
border-left-color: #999;
|
23
|
+
border-bottom-color: #BBB;
|
24
|
+
border-top: #B00100 solid 4px;
|
25
|
+
border-top-left-radius: 9px;
|
26
|
+
border-top-right-radius: 9px;
|
27
|
+
background-color: white;
|
28
|
+
padding: 7px 12% 0;
|
29
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
30
|
+
}
|
31
|
+
h1 {
|
32
|
+
font-size: 100%;
|
33
|
+
color: #730E15;
|
34
|
+
line-height: 1.5em;
|
35
|
+
}
|
36
|
+
div.dialog > p {
|
37
|
+
margin: 0 0 1em;
|
38
|
+
padding: 1em;
|
39
|
+
background-color: #F7F7F7;
|
40
|
+
border: 1px solid #CCC;
|
41
|
+
border-right-color: #999;
|
42
|
+
border-left-color: #999;
|
43
|
+
border-bottom-color: #999;
|
44
|
+
border-bottom-left-radius: 4px;
|
45
|
+
border-bottom-right-radius: 4px;
|
46
|
+
border-top-color: #DADADA;
|
47
|
+
color: #666;
|
48
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
49
|
+
}
|
50
|
+
</style>
|
51
|
+
</head>
|
52
|
+
<body>
|
53
|
+
<div class="dialog">
|
54
|
+
<div>
|
55
|
+
<h1>The change you wanted was rejected.</h1>
|
56
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
57
|
+
</div>
|
58
|
+
<p>If you are the application owner check the logs for more information.</p>
|
63
59
|
</div>
|
64
|
-
|
65
|
-
</div>
|
66
|
-
</body>
|
60
|
+
</body>
|
67
61
|
</html>
|
data/test/dummy/public/500.html
CHANGED
@@ -1,66 +1,60 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
<
|
58
|
-
<!-- This file lives in public/500.html -->
|
59
|
-
<div class="dialog">
|
60
|
-
<div>
|
61
|
-
<h1>We're sorry, but something went wrong.</h1>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
div.dialog {
|
15
|
+
width: 95%;
|
16
|
+
max-width: 33em;
|
17
|
+
margin: 4em auto 0;
|
18
|
+
}
|
19
|
+
div.dialog > div {
|
20
|
+
border: 1px solid #CCC;
|
21
|
+
border-right-color: #999;
|
22
|
+
border-left-color: #999;
|
23
|
+
border-bottom-color: #BBB;
|
24
|
+
border-top: #B00100 solid 4px;
|
25
|
+
border-top-left-radius: 9px;
|
26
|
+
border-top-right-radius: 9px;
|
27
|
+
background-color: white;
|
28
|
+
padding: 7px 12% 0;
|
29
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
30
|
+
}
|
31
|
+
h1 {
|
32
|
+
font-size: 100%;
|
33
|
+
color: #730E15;
|
34
|
+
line-height: 1.5em;
|
35
|
+
}
|
36
|
+
div.dialog > p {
|
37
|
+
margin: 0 0 1em;
|
38
|
+
padding: 1em;
|
39
|
+
background-color: #F7F7F7;
|
40
|
+
border: 1px solid #CCC;
|
41
|
+
border-right-color: #999;
|
42
|
+
border-left-color: #999;
|
43
|
+
border-bottom-color: #999;
|
44
|
+
border-bottom-left-radius: 4px;
|
45
|
+
border-bottom-right-radius: 4px;
|
46
|
+
border-top-color: #DADADA;
|
47
|
+
color: #666;
|
48
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
49
|
+
}
|
50
|
+
</style>
|
51
|
+
</head>
|
52
|
+
<body>
|
53
|
+
<div class="dialog">
|
54
|
+
<div>
|
55
|
+
<h1>We're sorry, but something went wrong.</h1>
|
56
|
+
</div>
|
57
|
+
<p>If you are the application owner check the logs for more information.</p>
|
62
58
|
</div>
|
63
|
-
|
64
|
-
</div>
|
65
|
-
</body>
|
59
|
+
</body>
|
66
60
|
</html>
|
data/test/generator_test.rb
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
require 'rails/generators'
|
3
|
-
require 'generators/cronjobs/install_generator'
|
3
|
+
require 'generators/cronjobs/install/install_generator'
|
4
4
|
|
5
|
-
class
|
6
|
-
|
7
|
-
tests Cronjobs::Generators::InstallGenerator
|
5
|
+
class GeneratorTest < Rails::Generators::TestCase
|
8
6
|
destination Rails.root.join('tmp')
|
9
7
|
|
10
8
|
teardown do
|
11
9
|
FileUtils.rm_rf destination_root
|
12
10
|
end
|
13
11
|
|
14
|
-
test '
|
12
|
+
test 'install' do
|
13
|
+
self.class.tests Cronjobs::Generators::InstallGenerator
|
15
14
|
run_generator
|
16
15
|
assert_file 'config/cronjobs.rb'
|
17
16
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
|
-
class
|
3
|
+
class TaskTest < ActiveSupport::TestCase
|
4
4
|
|
5
5
|
setup do
|
6
6
|
load File.expand_path('../../lib/tasks/cronjobs.rake', __FILE__)
|
@@ -11,16 +11,16 @@ class TasksTest < ActiveSupport::TestCase
|
|
11
11
|
FileUtils.rm_rf Rails.root.join('tmp')
|
12
12
|
end
|
13
13
|
|
14
|
-
test '
|
15
|
-
Cronjobs.expects(:
|
16
|
-
Rake::Task['cronjobs:
|
14
|
+
test 'update' do
|
15
|
+
Cronjobs.expects(:update).once
|
16
|
+
Rake::Task['cronjobs:update'].invoke
|
17
17
|
|
18
18
|
digest = Digest::MD5.file(Rails.root.join('config/cronjobs.rb'))
|
19
19
|
digest_path = Rails.root.join('tmp/digests/cronjobs')
|
20
20
|
FileUtils.mkdir_p digest_path.dirname
|
21
21
|
File.write digest_path, digest
|
22
|
-
Cronjobs.expects(:
|
23
|
-
Rake::Task['cronjobs:
|
22
|
+
Cronjobs.expects(:update).never
|
23
|
+
Rake::Task['cronjobs:update'].invoke
|
24
24
|
end
|
25
25
|
|
26
26
|
end
|
data/test/test_helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Configure Rails Environment
|
2
2
|
ENV['RAILS_ENV'] = 'test'
|
3
3
|
|
4
|
-
require File.expand_path('
|
4
|
+
require File.expand_path('../../test/dummy/config/environment.rb', __FILE__)
|
5
5
|
require 'rails/test_help'
|
6
6
|
require 'mocha/mini_test'
|
7
7
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cronjobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 4.0.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmontossi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
version: '1.1'
|
47
47
|
description: DSL to manage cronjobs in rails.
|
48
48
|
email:
|
49
|
-
- mmontossi@
|
49
|
+
- mmontossi@gmail.com
|
50
50
|
executables: []
|
51
51
|
extensions: []
|
52
52
|
extra_rdoc_files: []
|
@@ -54,14 +54,15 @@ files:
|
|
54
54
|
- MIT-LICENSE
|
55
55
|
- Rakefile
|
56
56
|
- lib/cronjobs.rb
|
57
|
+
- lib/cronjobs/definitions.rb
|
57
58
|
- lib/cronjobs/dsl/actions.rb
|
58
59
|
- lib/cronjobs/proxy.rb
|
59
60
|
- lib/cronjobs/railtie.rb
|
60
61
|
- lib/cronjobs/version.rb
|
61
|
-
- lib/generators/cronjobs/install_generator.rb
|
62
|
-
- lib/generators/cronjobs/templates/
|
62
|
+
- lib/generators/cronjobs/install/install_generator.rb
|
63
|
+
- lib/generators/cronjobs/install/templates/configuration.rb
|
63
64
|
- lib/tasks/cronjobs.rake
|
64
|
-
- test/
|
65
|
+
- test/definition_test.rb
|
65
66
|
- test/dummy/Rakefile
|
66
67
|
- test/dummy/app/assets/javascripts/application.js
|
67
68
|
- test/dummy/app/assets/stylesheets/application.css
|
@@ -91,14 +92,13 @@ files:
|
|
91
92
|
- test/dummy/config/locales/en.yml
|
92
93
|
- test/dummy/config/routes.rb
|
93
94
|
- test/dummy/config/secrets.yml
|
94
|
-
- test/dummy/log/development.log
|
95
95
|
- test/dummy/log/test.log
|
96
96
|
- test/dummy/public/404.html
|
97
97
|
- test/dummy/public/422.html
|
98
98
|
- test/dummy/public/500.html
|
99
99
|
- test/dummy/public/favicon.ico
|
100
100
|
- test/generator_test.rb
|
101
|
-
- test/
|
101
|
+
- test/task_test.rb
|
102
102
|
- test/test_helper.rb
|
103
103
|
homepage: https://github.com/mmontossi/cronjobs
|
104
104
|
licenses:
|
@@ -125,7 +125,7 @@ signing_key:
|
|
125
125
|
specification_version: 4
|
126
126
|
summary: Cronjobs for rails.
|
127
127
|
test_files:
|
128
|
-
- test/
|
128
|
+
- test/definition_test.rb
|
129
129
|
- test/dummy/app/assets/javascripts/application.js
|
130
130
|
- test/dummy/app/assets/stylesheets/application.css
|
131
131
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -154,7 +154,6 @@ test_files:
|
|
154
154
|
- test/dummy/config/routes.rb
|
155
155
|
- test/dummy/config/secrets.yml
|
156
156
|
- test/dummy/config.ru
|
157
|
-
- test/dummy/log/development.log
|
158
157
|
- test/dummy/log/test.log
|
159
158
|
- test/dummy/public/404.html
|
160
159
|
- test/dummy/public/422.html
|
@@ -162,5 +161,5 @@ test_files:
|
|
162
161
|
- test/dummy/public/favicon.ico
|
163
162
|
- test/dummy/Rakefile
|
164
163
|
- test/generator_test.rb
|
165
|
-
- test/
|
164
|
+
- test/task_test.rb
|
166
165
|
- test/test_helper.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'rails/generators/base'
|
2
|
-
|
3
|
-
module Cronjobs
|
4
|
-
module Generators
|
5
|
-
class InstallGenerator < Rails::Generators::Base
|
6
|
-
|
7
|
-
source_root File.expand_path('../templates', __FILE__)
|
8
|
-
|
9
|
-
def create_definitions_file
|
10
|
-
copy_file 'definitions.rb', 'config/cronjobs.rb'
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
[1m[36m (19.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
2
|
-
[1m[35m (4.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
-
Migrating to CreateUsers (20160918232127)
|
5
|
-
[1m[35m (0.2ms)[0m BEGIN
|
6
|
-
[1m[36m (14.2ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m
|
7
|
-
[1m[35mSQL (0.3ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160918232127"]]
|
8
|
-
[1m[36m (6.4ms)[0m [1mCOMMIT[0m
|
9
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.3ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
10
|
-
[1m[36m (3.3ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
11
|
-
FROM pg_constraint c
|
12
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
13
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
14
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
15
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
16
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
17
|
-
WHERE c.contype = 'f'
|
18
|
-
AND t1.relname = 'users'
|
19
|
-
AND t3.nspname = ANY (current_schemas(false))
|
20
|
-
ORDER BY c.conname
|
21
|
-
[0m
|
22
|
-
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
23
|
-
[1m[35mActiveRecord::SchemaMigration Load (0.2ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
24
|
-
[1m[36m (3.2ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
25
|
-
FROM pg_constraint c
|
26
|
-
JOIN pg_class t1 ON c.conrelid = t1.oid
|
27
|
-
JOIN pg_class t2 ON c.confrelid = t2.oid
|
28
|
-
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
29
|
-
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
30
|
-
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
31
|
-
WHERE c.contype = 'f'
|
32
|
-
AND t1.relname = 'users'
|
33
|
-
AND t3.nspname = ANY (current_schemas(false))
|
34
|
-
ORDER BY c.conname
|
35
|
-
[0m
|