Skip to content

Commit

Permalink
db: migrate Licenses to Keywords
Browse files Browse the repository at this point in the history
The big picture:

Background: it was decided not to implement any specialized buisiness-logic dealing with Copyrights/Licenses, therefore the entity `Licenses` is not needed anymore.
They are already handled in the UI like `Keywords`.

So instead of having 'Licenses' as an entitiy, we allow to have configurable "custom types of Keywords". Existing instances will have their Licenses migrated to :Keywords of type License"

*Note that the "custom types" are called RDF Classes because semantically they are, but that is not relevant for now.*

## DB changes

minimal RDF setup to support "Licenses as Keywords":

- add table `rdf_classes`, for admin info and constraints about RDF Classes
- add `meta_key.allowed_rdf_class` (for Keyword-Keys)
- add attributes to `keyword`: `rdf_class, description, external_uri`

Licenses migration:
- 1 MetaKey of type License is supported (only possible for migrated v2-instances; does nothing if no such MetaKey and fails if more than 1)
- this selected MetaKey is used for the newly created Keywords (since they need a `meta_key` relation which Licenses did not have)
- insert a `rdf_class` with id `License`
- **migrate everything from `licenses` to `keywords` (with `rdf_class='License'`)**
- also migrate all the related things (the `meta_key`, `meta_data_keywords` etc.)
- drop licenses, their groups, etc.

## App changes

removed licenses from all the apps/specs.
additions are listed below

### API

- does not have Licenses anymore
- shows the new attributes for Keywords

### Admin

- supports `meta_key.allowed_rdf_class`

### Webapp

- has a view to show Keyword information, so that information about Licenses (and other types of custom Keywords can be seen)
- this view is not linked yet (it is as hidden as the Licenses were)
- existing Metadata UI does not change (was already adapted).
  - adding Licenses to MetaData works like Keywords
  - *creating* new Licenses is (still) not supported! (in general: custom rdf_classes for keywords are supported but the can't be `extensible`)
  • Loading branch information
eins78 committed Apr 24, 2017
1 parent 0eef9ef commit e700b3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webapp

0 comments on commit e700b3d

Please sign in to comment.