pg_insights 0.2.0 → 0.2.1
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.
- checksums.yaml +4 -4
- data/lib/generators/pg_insights/install_generator.rb +1 -1
- data/lib/generators/pg_insights/templates/db/migrate/create_pg_insights_health_check_results.rb +16 -0
- data/lib/generators/pg_insights/templates/db/migrate/create_pg_insights_queries.rb +12 -0
- data/lib/pg_insights/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d38a7931c85980d77ac00274e9fd20d0aeeccea9968fcdce682e094c2fa8859
|
4
|
+
data.tar.gz: 46ace0d92f363030da888b4fc3c0b81ba3429d6d46be11ed884e87cf953d982e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72dc38b44223c63b08cf4a3021f53d96dca26c91a00447a92c9434f012add4f2693d02217fcbcc3d5a1a7117584ecab9b5248880a1510220ec24879591ec8b46
|
7
|
+
data.tar.gz: 54bfd327be06ff7b2032fbd937e5bd9f1b1ee32042349d58a34efe4025ffcc650e4d219586c0afd116cb21113ca28b3cb43d07d9e2fe8bbf85f717935d648770
|
@@ -7,7 +7,7 @@ module PgInsights
|
|
7
7
|
class InstallGenerator < Rails::Generators::Base
|
8
8
|
include Rails::Generators::Migration
|
9
9
|
|
10
|
-
source_root File.expand_path("
|
10
|
+
source_root File.expand_path("templates", __dir__)
|
11
11
|
|
12
12
|
def self.next_migration_number(dirname)
|
13
13
|
ActiveRecord::Generators::Base.next_migration_number(dirname)
|
data/lib/generators/pg_insights/templates/db/migrate/create_pg_insights_health_check_results.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreatePgInsightsHealthCheckResults < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
create_table :pg_insights_health_check_results do |t|
|
4
|
+
t.string :check_type, null: false, limit: 50
|
5
|
+
t.json :result_data
|
6
|
+
t.string :status, null: false, default: "pending", limit: 20
|
7
|
+
t.text :error_message
|
8
|
+
t.datetime :executed_at
|
9
|
+
t.integer :execution_time_ms
|
10
|
+
t.timestamps
|
11
|
+
|
12
|
+
t.index [ :check_type, :executed_at ], name: "idx_pg_insights_health_check_type_executed_at"
|
13
|
+
t.index [ :status, :executed_at ], name: "idx_pg_insights_health_status_executed_at"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreatePgInsightsQueries < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
create_table :pg_insights_queries do |t|
|
4
|
+
t.string :name, null: false
|
5
|
+
t.text :sql, null: false
|
6
|
+
t.string :description
|
7
|
+
t.string :category, null: false, default: "saved"
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :pg_insights_queries, :name, unique: true
|
11
|
+
end
|
12
|
+
end
|
data/lib/pg_insights/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_insights
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mezbah Alam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -96,6 +96,8 @@ files:
|
|
96
96
|
- config/routes.rb
|
97
97
|
- lib/generators/pg_insights/clean_generator.rb
|
98
98
|
- lib/generators/pg_insights/install_generator.rb
|
99
|
+
- lib/generators/pg_insights/templates/db/migrate/create_pg_insights_health_check_results.rb
|
100
|
+
- lib/generators/pg_insights/templates/db/migrate/create_pg_insights_queries.rb
|
99
101
|
- lib/pg_insights.rb
|
100
102
|
- lib/pg_insights/engine.rb
|
101
103
|
- lib/pg_insights/version.rb
|