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

Differences in database schemas: schema of "fresh installation" vs. schema obtained after migration (based on DS CRIS 5) #371

Open
saschaszott opened this issue Aug 8, 2023 · 0 comments
Labels

Comments

@saschaszott
Copy link

saschaszott commented Aug 8, 2023

The database schema (in Postgres) you'll get with a "fresh" DS CRIS 7 installation is not the same as the database schema you’ll get if you apply the DS CRIS 7 Flyway migration scripts on an existing DS CRIS 5.x installation.

The differences are summarized in the table below:

name of database object type of database object fresh DS CRIS 7 install migration to DS CRIS 7
cris_unpaywall table table not present CREATE TABLE …
cris_unpaywall_seq sequence sequence not present CREATE SEQUENCE …
doi2item_seq sequence sequence not present CREATE SEQUENCE …
eperson.netid table column netid character varying(64) netid character varying(256)
subscription.community_id table column column not present community_id integer
webapp.url table column url character varying url character varying(1000)
cwf_claimtask_unique UNIQUE constraint missing CONSTRAINT cwf_claimtask_unique UNIQUE (step_id, workflowitem_id, workflow_id, owner_id, action_id)
cwf_collectionrole_unique UNIQUE constraint missing CONSTRAINT cwf_collectionrole_unique UNIQUE (role_id, collection_id, group_id)
cwf_in_progress_user_unique UNIQUE constraint missing CONSTRAINT cwf_in_progress_user_unique UNIQUE (workflowitem_id, user_id)
cwf_workflowitem_item_id_key UNIQUE constraint missing CONSTRAINT cwf_workflowitem_item_id_key UNIQUE (item_id)
cwf_workflowitemrole_unique UNIQUE constraint missing CONSTRAINT cwf_workflowitemrole_unique UNIQUE (role_id, workflowitem_id, eperson_id)
cwf_claimtask_eperson_fk_idx INDEX missing CREATE INDEX cwf_claimtask_eperson_fk_idx ON public.cwf_claimtask USING btree (owner_id)
cwf_claimtask_workflow_eperson_fk_idx INDEX missing CREATE INDEX cwf_claimtask_workflow_eperson_fk_idx ON public.cwf_claimtask USING btree (workflowitem_id, owner_id)
cwf_claimtask_workflow_step_action_eperson_fk_idx INDEX missing CREATE INDEX cwf_claimtask_workflow_step_action_eperson_fk_idx ON public.cwf_claimtask USING btree (workflowitem_id, step_id, action_id, owner_id)
cwf_collectionrole_coll_fk_idx INDEX missing  CREATE INDEX cwf_collectionrole_coll_fk_idx ON public.cwf_collectionrole USING btree (collection_id)
cwf_collectionrole_coll_role_fk_idx INDEX missing CREATE INDEX cwf_collectionrole_coll_role_fk_idx ON public.cwf_collectionrole USING btree (collection_id, role_id) 
cwf_in_progress_user_eperson_fk_idx INDEX missing CREATE INDEX cwf_in_progress_user_eperson_fk_idx ON public.cwf_in_progress_user USING btree (user_id) 
cwf_in_progress_user_workflow_eperson_fk_idx INDEX missing  CREATE INDEX cwf_in_progress_user_workflow_eperson_fk_idx ON public.cwf_in_progress_user USING btree (workflowitem_id, user_id)
cwf_pooltask_eperson_fk_idx INDEX missing CREATE INDEX cwf_pooltask_eperson_fk_idx ON public.cwf_pooltask USING btree (eperson_id)
cwf_pooltask_workflow_eperson_fk_idx INDEX missing CREATE INDEX cwf_pooltask_workflow_eperson_fk_idx ON public.cwf_pooltask USING btree (eperson_id, workflowitem_id)
cwf_workflowitem_coll_fk_idx INDEX missing CREATE INDEX cwf_workflowitem_coll_fk_idx ON public.cwf_workflowitem USING btree (collection_id)
cwf_workflowitem_item_fk_idx INDEX missing CREATE INDEX cwf_workflowitem_item_fk_idx ON public.cwf_workflowitem USING btree (item_id)

Please find attached the export of the database schema obtained by using pg_dump -s:

@saschaszott saschaszott added the bug label Aug 8, 2023
@saschaszott saschaszott changed the title Differences in database schema: "fresh installation" vs. schema migration (based on DS CRIS 5) Differences in database schemas: schema of "fresh installation" vs. schema obtained after migration (based on DS CRIS 5) Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant