Test for missing FK indexes
This commit is contained in:
parent
b4332b47d5
commit
b5fcb82bff
2 changed files with 44 additions and 0 deletions
17
test/pleroma/schema_test.exs
Normal file
17
test/pleroma/schema_test.exs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.SchemaTest do
|
||||
use Pleroma.DataCase, async: true
|
||||
|
||||
alias Pleroma.Repo
|
||||
|
||||
test "No unindexed foreign keys" do
|
||||
query = File.read!("test/fixtures/unindexed_fk.sql")
|
||||
|
||||
{:ok, result} = Repo.query(query)
|
||||
|
||||
assert Enum.empty?(result.rows)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue