From cc0b9f7f368cbf1b0c608ae141f41b53433ed195 Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 28 Nov 2024 16:23:58 +0000 Subject: [PATCH] add federails moderation migrations --- ...moderation_reports.federails_moderation.rb | 14 +++++++++++ ...tion_domain_blocks.federails_moderation.rb | 9 +++++++ db/schema.rb | 24 ++++++++++++++++++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20241128162213_create_federails_moderation_reports.federails_moderation.rb create mode 100644 db/migrate/20241128162214_create_federails_moderation_domain_blocks.federails_moderation.rb diff --git a/db/migrate/20241128162213_create_federails_moderation_reports.federails_moderation.rb b/db/migrate/20241128162213_create_federails_moderation_reports.federails_moderation.rb new file mode 100644 index 000000000..6720c2b4a --- /dev/null +++ b/db/migrate/20241128162213_create_federails_moderation_reports.federails_moderation.rb @@ -0,0 +1,14 @@ +# This migration comes from federails_moderation (originally 20241127105043) +class CreateFederailsModerationReports < ActiveRecord::Migration[7.0] + def change + create_table :federails_moderation_reports do |t| + t.string :federated_url + t.references :federails_actor, foreign_key: true + t.string :content + t.references :object, polymorphic: true + t.datetime :resolved_at + t.string :resolution + t.timestamps + end + end +end diff --git a/db/migrate/20241128162214_create_federails_moderation_domain_blocks.federails_moderation.rb b/db/migrate/20241128162214_create_federails_moderation_domain_blocks.federails_moderation.rb new file mode 100644 index 000000000..9330fa5c3 --- /dev/null +++ b/db/migrate/20241128162214_create_federails_moderation_domain_blocks.federails_moderation.rb @@ -0,0 +1,9 @@ +# This migration comes from federails_moderation (originally 20241128115659) +class CreateFederailsModerationDomainBlocks < ActiveRecord::Migration[7.0] + def change + create_table :federails_moderation_domain_blocks do |t| + t.string "domain", null: false, index: { unique: true } + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index dfa396a99..2237fe061 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.2].define(version: 2024_11_22_121621) do +ActiveRecord::Schema[7.2].define(version: 2024_11_28_162214) do create_table "caber_relations", force: :cascade do |t| t.string "subject_type" t.integer "subject_id" @@ -140,6 +140,27 @@ t.index ["uuid"], name: "index_federails_followings_on_uuid", unique: true end + create_table "federails_moderation_domain_blocks", force: :cascade do |t| + t.string "domain", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["domain"], name: "index_federails_moderation_domain_blocks_on_domain", unique: true + end + + create_table "federails_moderation_reports", force: :cascade do |t| + t.string "federated_url" + t.integer "federails_actor_id" + t.string "content" + t.string "object_type" + t.integer "object_id" + t.datetime "resolved_at" + t.string "resolution" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["federails_actor_id"], name: "index_federails_moderation_reports_on_federails_actor_id" + t.index ["object_type", "object_id"], name: "index_federails_moderation_reports_on_object" + end + create_table "flipper_features", force: :cascade do |t| t.string "key", null: false t.datetime "created_at", null: false @@ -328,6 +349,7 @@ add_foreign_key "federails_activities", "federails_actors", column: "actor_id" add_foreign_key "federails_followings", "federails_actors", column: "actor_id" add_foreign_key "federails_followings", "federails_actors", column: "target_actor_id" + add_foreign_key "federails_moderation_reports", "federails_actors" add_foreign_key "model_files", "model_files", column: "presupported_version_id" add_foreign_key "model_files", "models" add_foreign_key "models", "collections"