Skip to content

Write UserDB migration script #222

@m1ci

Description

@m1ci

note: migrated from another repo.

by @holycrab13

The user database schema changed for the new databus multi-account feature.

The current user database contains the tables:

USER (sub [PK], accountName, email)
APIKEYS (keyname, sub [FK], key)

This needs to be migrated to three tables:

USER (sub [PK], email)
ACCOUNTS (accountName [PK], sub [FK], )
APIKEYS (keyname, accountName [FK], key)

I.e. each user in the old USER table gets an entry in new USER and ACCOUNT table. APIKEYS are then set with accountName as foreign key instead of sub.

The gstore (git and virtuoso) can be kept as is.

by @holycrab13

Script is done and can be used to convert an existing user db. No point doing version control, since it's such a niche use case. Added it here:
databus-user-migration.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions