Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROPOSAL] lino constraint disable #169

Open
adrienaury opened this issue Jun 23, 2023 · 1 comment
Open

[PROPOSAL] lino constraint disable #169

adrienaury opened this issue Jun 23, 2023 · 1 comment

Comments

@adrienaury
Copy link
Member

adrienaury commented Jun 23, 2023

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 <table_name>

$ lino constraints list --table <table_name>
{"table": "ACTION", "constraint_name": "FK_ACTION_01"}

List constraints on foreign key pointing to any table in the ingress-descriptor

$ lino constraints list --i <ingress-descriptor-name>
{"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 <table_name>

$ lino constraints disable --table <table_name> > constraints.jsonl
1 constraint disabled

List and disable constraints on foreign key pointing to any table in the ingress-descriptor

$ lino constraints disable -i <ingress-descriptor-name> > constraints.jsonl
1 constraint disabled

Enable constraints previously disabled

$ lino constraints enable < constraints.jsonl
1 constraint enabled
@adrienaury
Copy link
Member Author

adrienaury commented Sep 21, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant