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

another cross dependency: updateFrequency FK from DataSet to pkg_mgmt #79

Open
gastil opened this issue Oct 8, 2019 · 2 comments
Open

Comments

@gastil
Copy link
Contributor

gastil commented Oct 8, 2019

If someone wanted to install only the lter_metabase schema, they would get errors for items that depend on things in pkg_mgmt, such as:

pg_restore: [archiver (db)] could not execute query: ERROR:  schema "pkg_mgmt" does not exist
    Command was: ALTER TABLE ONLY "DataSet"
    ADD CONSTRAINT "FK_DataSet_UpdateFrequency" FOREIGN KEY ("UpdateFrequency") REFERENCES pkg_mg...
@atn38
Copy link
Member

atn38 commented Oct 8, 2019 via email

@gastil
Copy link
Contributor Author

gastil commented Oct 9, 2019

Discussion here with Mob, Li and Gastil reached decision: We want new mb users to have to install pkg_mgmt. Only a few columns in pkg_mgmt.pkg_state are required. We could arrange column order to place those to the left side of the wide table. pkg_state should be the parent of lter_metabase.DataSet since changes we want changes to Revision to cascade. Not much changes in DataSet in the life of a dataset whereas pkg_mgmt is the most oft edited table in the database. Datasets begin their life in pkg_mgmt in as status anticipated before they exist in DataSet.

We are uncomfortable with nickname and shortName both existing without an FK binding them to their dataset and between schemas. For human editors, this column is convenient for recognizing datasets. DataSet has title so if we do choose to remove from one table (rather than FK them), keep it in pkg_mgmt. What do others think?

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

2 participants