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

WIP: make organization name its id, drop the mongo id #7386

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Oct 15, 2023

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • abc

TODOs:

  • update in sql schema
  • update in scala code
  • the mongoid is used as key in loki?
  • update in routes
  • update in proto
  • update in frontend
  • checks on name in sql and create organization code (allow [A-Za-z0-9\-_. ]+ in sql)
  • test around
  • sql migration, careful with foreign keys
    • to make rollback easier, keep old ids, rename to nullable unused column?
    • migrate analytics events json in postgres
      • for foreign-webknossos analytics events it may be that the id cannot be looked up. talk to norman on how to handle these.
  • make sure that analytics events those from old webknossoses can still be ingested
  • bump api version, provide adapters → only for routes used by python client. e.g. dataset_list
  • todos in code
  • change worker job arguments from organization_name to organization_id (maybe follow-up for easier rollbacks of this pr)
  • ?

Issues:


(Please delete unneeded items, merge only when none are left open)

@fm3 fm3 self-assigned this Oct 15, 2023
@@ -318,8 +318,7 @@ CREATE TABLE webknossos.timespans(

CREATE TYPE webknossos.PRICING_PLANS AS ENUM ('Basic', 'Team', 'Power', 'Team_Trial', 'Power_Trial', 'Custom');
CREATE TABLE webknossos.organizations(
_id CHAR(24) PRIMARY KEY,
name VARCHAR(256) NOT NULL UNIQUE,
_id VARCHAR(256) PRIMARY KEY CHECK (_id ~* '^[A-Za-z0-9\-_. ]+$'),
additionalInformation VARCHAR(2048) NOT NULL DEFAULT '',
logoUrl VARCHAR(2048) NOT NULL DEFAULT '',
displayName VARCHAR(1024) NOT NULL DEFAULT '',
Copy link
Contributor

@MichaelBuessemeyer MichaelBuessemeyer Aug 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes for me:

still needs to be renamed to display name

and keep old _id column somehow for potential rollbacks

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

Successfully merging this pull request may close these issues.

Make the organization name its id, drop the mongo id
3 participants