fix: Macros authorizations (#5779)

Macros policy update.

ref: #5730
This commit is contained in:
Tejaswini Chile
2022-11-08 07:16:00 +05:30
committed by GitHub
parent 479d88a480
commit 48373628a1
8 changed files with 177 additions and 38 deletions

View File

@@ -0,0 +1,9 @@
class ChangeMacrosCreatedByToNull < ActiveRecord::Migration[6.1]
def change
change_column_null :macros, :created_by_id, true
change_column_null :macros, :updated_by_id, true
remove_index :macros, :created_by_id, if_exists: true
remove_index :macros, :updated_by_id, if_exists: true
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_10_17_201914) do
ActiveRecord::Schema.define(version: 2022_11_02_082737) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
@@ -577,14 +577,12 @@ ActiveRecord::Schema.define(version: 2022_10_17_201914) do
t.bigint "account_id", null: false
t.string "name", null: false
t.integer "visibility", default: 0
t.bigint "created_by_id", null: false
t.bigint "updated_by_id", null: false
t.bigint "created_by_id"
t.bigint "updated_by_id"
t.jsonb "actions", default: {}, null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["account_id"], name: "index_macros_on_account_id"
t.index ["created_by_id"], name: "index_macros_on_created_by_id"
t.index ["updated_by_id"], name: "index_macros_on_updated_by_id"
end
create_table "mentions", force: :cascade do |t|