[PROPOSAL] lino constraint disable
- Dominant language
- Go
- Stars
- 23
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
# Problem
As a user of lino command, I want to disable foreign key constraints on a given table or ingress-descriptor, without re-enabling immediately. I want to be able to enable disabled contraints later.
# Solution
The new command `lino constraint` will handle listing/enabling/disabling of foreign key contraints.
**List constraints on foreign key pointing to **
```console
$ lino constraints list --table
{"table": "ACTION", "constraint_name": "FK_ACTION_01"}
```
**List constraints on foreign key pointing to any table in the ingress-descriptor**
```console
$ lino constraints list --i
{"table": "ACTION", "constraint_name": "FK_ACTION_01"}
```
- constraints are listed in the order they need to be enabled
**List and disable constraints on foreign key pointing to **
```console
$ lino constraints disable --table > constraints.jsonl
1 constraint disabled
```
**List and disable constraints on foreign key pointing to any table in the ingress-descriptor**
```console
$ lino constraints disable -i > constraints.jsonl
1 constraint disabled
```
**Enable constraints previously disabled**
```console
$ lino constraints enable < constraints.jsonl
1 constraint enabled
```
Contributor guide
Assessment
This issue has not been assessed yet.