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

Add our own db column types via the public API #25089

Merged
merged 2 commits into from
Jan 12, 2021
Merged

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Jan 12, 2021

Because of #24948 we need to adjust lots of apps since the doctrine type constants were used directly. To prevent this data leakage, we should have our own set of supported db column types.

So this is not a simple copy of the upstream types, but a shortened version that only has the things that works across all of our DBs.

One might argue that some of the more advanced types do not make sense in combination with our query builder or db mappers, because those either map to string or another primitive. But I think it still makes sense to have the db column types in the desired format, if applicable. Then the DB will not only ensure the type is correct, it can also optimize for storage and retrieval.

Ref https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html

This PR consists of two commits/parts. The first one adds the new constants, the second one updates the server code to make use of them.

I'll update the docs accordingly when we settled on the exported types.

@faily-bot
Copy link

faily-bot bot commented Jan 12, 2021

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 1292: failure

acceptance-header

  • tests/acceptance/features/header.feature:33
Show full log
  Scenario: users from other groups are not seen in the contacts menu when autocompletion is restricted within the same group # /drone/src/tests/acceptance/features/header.feature:33
    Given I am logged in as the admin                                                                                         # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I visit the settings page                                                                                             # SettingsMenuContext::iVisitTheSettingsPage()
    And I open the "Sharing" section of the "Administration" group                                                            # AppNavigationContext::iOpenTheSectionOf()
    And I enable restricting username autocompletion to groups                                                                # SettingsContext::iEnableRestrictingUsernameAutocompletionToGroups()
    And I see that username autocompletion is restricted to groups                                                            # SettingsContext::iSeeThatUsernameAutocompletionIsRestrictedToGroups()
    When I open the Contacts menu                                                                                             # ContactsMenuContext::iOpenTheContactsMenu()
    Then I see that the Contacts menu is shown                                                                                # ContactsMenuContext::iSeeThatTheContactsMenuIsShown()
    And I see that the contact "user0" in the Contacts menu is not shown                                                      # ContactsMenuContext::iSeeThatTheContactInTheContactsMenuIsNotShown()
      Failed asserting that true is false.
    And I see that the contact "admin" in the Contacts menu is not shown                                                      # ContactsMenuContext::iSeeThatTheContactInTheContactsMenuIsNotShown()

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants