mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
add preserve submitters order option
This commit is contained in:
1 parent
07e49f9f07
commit
62cea05084
15 files changed
+118
-28
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddSubmittersOrderToSubmissions < ActiveRecord::Migration[7.0]
|
||||
class MigrationSubmission < ApplicationRecord
|
||||
self.table_name = 'submissions'
|
||||
end
|
||||
|
||||
def change
|
||||
add_column :submissions, :submitters_order, :string
|
||||
|
||||
MigrationSubmission.where(submitters_order: nil).update_all(submitters_order: 'random')
|
||||
|
||||
change_column_null :submissions, :submitters_order, false
|
||||
end
|
||||
end
|
||||
+2
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_09_02_171216) do
|
||||
ActiveRecord::Schema[7.0].define(version: 2023_09_09_213212) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
||||
@@ -101,6 +101,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_02_171216) do
|
||||
t.text "template_schema"
|
||||
t.text "template_submitters"
|
||||
t.text "source", null: false
|
||||
t.string "submitters_order", null: false
|
||||
t.index ["created_by_user_id"], name: "index_submissions_on_created_by_user_id"
|
||||
t.index ["template_id"], name: "index_submissions_on_template_id"
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user