Add anonymous feedback (#380)

This commit is contained in:
Riccardo Graziosi
2024-07-12 20:38:46 +02:00
committed by GitHub
parent 7a37dae22d
commit a49b5695f5
71 changed files with 1446 additions and 255 deletions

View File

@@ -0,0 +1,6 @@
class AddAnonymousFeedbackToTenantSettings < ActiveRecord::Migration[6.1]
def change
add_column :tenant_settings, :allow_anonymous_feedback, :boolean, default: true, null: false
add_column :tenant_settings, :feedback_approval_policy, :integer, default: 0, null: false
end
end

View File

@@ -0,0 +1,5 @@
class AddApprovalStatusToPost < ActiveRecord::Migration[6.1]
def change
add_column :posts, :approval_status, :integer, default: 0, null: false
end
end

View File

@@ -0,0 +1,5 @@
class RemoveNotNullUserIdFromPosts < ActiveRecord::Migration[6.1]
def change
change_column :posts, :user_id, :bigint, null: 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: 2024_05_21_124018) do
ActiveRecord::Schema.define(version: 2024_07_08_191938) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -117,12 +117,13 @@ ActiveRecord::Schema.define(version: 2024_05_21_124018) do
t.string "title", null: false
t.text "description"
t.bigint "board_id", null: false
t.bigint "user_id", null: false
t.bigint "user_id"
t.bigint "post_status_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.bigint "tenant_id", null: false
t.string "slug"
t.integer "approval_status", default: 0, null: false
t.index ["board_id"], name: "index_posts_on_board_id"
t.index ["post_status_id"], name: "index_posts_on_post_status_id"
t.index ["slug", "tenant_id"], name: "index_posts_on_slug_and_tenant_id", unique: true
@@ -165,6 +166,8 @@ ActiveRecord::Schema.define(version: 2024_05_21_124018) do
t.integer "collapse_boards_in_header", default: 0, null: false
t.text "custom_css"
t.boolean "show_powered_by", default: true, null: false
t.boolean "allow_anonymous_feedback", default: true, null: false
t.integer "feedback_approval_policy", default: 0, null: false
t.index ["tenant_id"], name: "index_tenant_settings_on_tenant_id"
end