question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable Primary key columns in table/column UI

See original GitHub issue

Separate the model that holds table information from database (TableModel) from the model used to serialize table information to efpt.config.json file by introducing a SerializationTableModel, and use that in the ReverseEngineerOptions class.

So not:

public List<TableModel> Tables { get; set; }

But:

public List<SerializationTableModel> Tables { get; set; } 

In ReverseEngineerOptions class.

Change the columns property in the TableModel class from list of string to a list of ColumnModel which is a class that contains the name and a bool specifying if it’s a primary key column. This class and can be easily extended to add other information in the future.

Use information from the updated TableModel to disable primary key nodes in the UI.

No worries about the breaking nature of this at this point in time.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ErikEJcommented, Nov 22, 2020

Hold your horses! I am working on the TableModel part as we speak!

0reactions
ErikEJcommented, Nov 23, 2020

Yes, just go ahead and do that. Good luck with your presentation!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change primary key column in SQL Server
Assuming that your current primary key constraint is called pk_history, you can replace the following lines: ALTER TABLE history ADD PRIMARY ...
Read more >
Primary Key Constraint
The PRIMARY KEY constraint specifies that the constrained columns' values must uniquely identify each row. A table can only have one primary key, ......
Read more >
Change Primary Key Column in SQL Server
We can drop this primary key by using the CONSTRAINT_NAME mentioned in the image. From here copy CONSTRAINT_NAME to drop the primary key....
Read more >
MySQL Primary Key: CREATE and ALTER TABLE ...
A primary key column must contain unique values. ... To remove Primary Key from a table, you can use the ALTER TABLE statement....
Read more >
Primary keys | DataGrip Documentation
A table can have only one primary key, and this primary key can consist of single or multiple columns. When a primary key...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found