commit dfdd7f5d25dbc476374253b0bee7ef85253ead36
parent c69b3d9b711f25a59f9150b58463507306929b34
Author: srfsh <dev@srf.sh>
Date: Thu, 8 Dec 2022 17:00:23 +0300
mig: get rid of EventOrCommitment
Diffstat:
2 files changed, 0 insertions(+), 37 deletions(-)
diff --git a/priv/repo/migrations/20211110080000_create_all_tables.exs b/priv/repo/migrations/20211110080000_create_all_tables.exs
@@ -50,7 +50,6 @@ def change() do
create table("vf_intent")
create table("vf_commitment")
create table("vf_fulfillment")
- create table("vf_event_or_commitment")
create table("vf_satisfaction")
create table("vf_claim")
create table("vf_settlement")
diff --git a/priv/repo/migrations/20211115074158_fill_vf_event_or_commitment.exs b/priv/repo/migrations/20211115074158_fill_vf_event_or_commitment.exs
@@ -1,36 +0,0 @@
-# Zenflows is designed to implement the Valueflows vocabulary,
-# written and maintained by srfsh <info@dyne.org>.
-# Copyright (C) 2021-2022 Dyne.org foundation <foundation@dyne.org>.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-defmodule Zenflows.DB.Repo.Migrations.Fill_vf_event_or_commitment do
-use Ecto.Migration
-
-@check """
-(event_id IS NULL AND commitment_id IS NOT NULL)
-OR
-(event_id IS NOT NULL AND commitment_id IS NULL)
-"""
-
-def change() do
- alter table("vf_event_or_commitment") do
- add :event_id, references("vf_economic_event")
- add :commitment_id, references("vf_commitment")
- timestamps()
- end
-
- create constraint("vf_event_or_commitment", :mutex, check: @check)
-end
-end