Initial commit on Forgejo
Fresh repository history for elektrine/tarakan hosted at https://git.elektrine.com/elektrine/tarakan.
This commit is contained in:
commit
af6077b9c3
455 changed files with 78366 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
defmodule Tarakan.Repo.Migrations.BoundScanFindingLines do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
drop constraint(:scan_findings, :scan_findings_lines_must_be_ordered)
|
||||
|
||||
create constraint(:scan_findings, :scan_findings_lines_must_be_ordered,
|
||||
check:
|
||||
"(line_start IS NULL AND line_end IS NULL) OR " <>
|
||||
"(line_start BETWEEN 1 AND 1000000 AND " <>
|
||||
"line_end BETWEEN line_start AND 1000000)"
|
||||
)
|
||||
end
|
||||
|
||||
def down do
|
||||
drop constraint(:scan_findings, :scan_findings_lines_must_be_ordered)
|
||||
|
||||
create constraint(:scan_findings, :scan_findings_lines_must_be_ordered,
|
||||
check:
|
||||
"(line_start IS NULL) OR " <>
|
||||
"(line_start >= 1 AND (line_end IS NULL OR line_end >= line_start))"
|
||||
)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue