git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Database referral integrity


Ooh good spot.

Yes I would be in favour of adding these, but as you say we need to thing about how we might migrate old data.

Doing this at 2.0.0 and providing a cleanup script (or doing it as part of the migration?) is probably the way to go.

-ash-

> On 17 Sep 2018, at 19:56, Stefan Seelmann <mail@xxxxxxxxxxxxxxxxxx> wrote:
> 
> Hi,
> 
> looking into the DB schema there is almost no referral integrity
> enforced at the database level. Many foreign key constraints between
> dag, dag_run, task_instance, xcom, dag_pickle, log, etc would make sense
> IMO.
> 
> Is there a particular reason why that's not implemented?
> 
> Introducing it now will be hard, probably any real-world setup has some
> violations. But I'm still in favor of this additional safety net.
> 
> Kind Regards,
> Stefan