mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
add stats
This commit is contained in:
1 parent
f85fd3cff7
commit
c1aac6b763
2 files changed
+19
-1
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddSubmissionsAccountTemplateStatistics < ActiveRecord::Migration[8.1]
|
||||
def up
|
||||
return unless adapter_name == 'PostgreSQL'
|
||||
|
||||
execute <<~SQL.squish
|
||||
CREATE STATISTICS IF NOT EXISTS submissions_account_template_stats (dependencies, ndistinct)
|
||||
ON account_id, template_id FROM submissions
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
return unless adapter_name == 'PostgreSQL'
|
||||
|
||||
execute 'DROP STATISTICS IF EXISTS submissions_account_template_stats'
|
||||
end
|
||||
end
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.1].define(version: 2026_07_07_055354) do
|
||||
ActiveRecord::Schema[8.1].define(version: 2026_08_19_091500) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "btree_gin"
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
|
||||
Reference in new issue
Block a user