-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Support CockroachDB #1404
Comments
Hi there! You don’t need the triggers. It was there just to cover the time, when there were running instances with multiple different versions. Feel free to submit PR disabling this migration for CockroachDB. |
Neat :D I was assuming it is still needed because of the query that is being executed: https://github.com/tolgee/tolgee-platform/blob/main/backend/data/src/main/resources/db/changelog/hideApiKeyMigration.sql can you point me in some direction to disable certain migrations? |
:/ ok found another error: Hopefully would be added with cockroachdb/cockroach#3781 (but no clue when) https://github.com/tolgee/tolgee-platform/blob/main/backend/data/src/main/kotlin/io/tolgee/repository/activity/ActivityRevisionRepository.kt#L64 here is the query with the function. Would it be possible to change it to (not sure how to add the typecast in that query) select
count(ar.id) as count,
ar.timestamp::date as date
from
activity_revision ar
where
ar.project_id = 1
group by date
order by date
# Now:
# select count(ar.id) as count, function('to_char', ar.timestamp, 'yyyy-MM-dd') as date
# New? (::date would also format it in iso so the output would be identical if this works)
# select count(ar.id) as count, ar.timestamp::date as date |
You can specify dbms in the You can provide these params when the liquibase bean is created:
To actually disable the statements, you can use precondidions: I actually never done this. So I am just guessing. |
I don't really remember why it's there. Let me check... 😆 |
Seems like you would be able to create same result, by using different methods supported by CockroachDB.
|
I've tested this and it doesn't work, But this works:
|
with |
I've created a PR. Let's se what the test result shows, but it looks like we will have to wait for CRDB 22.2. |
@JanCizmar is there a way for me to get a dockerimage with the modifications? Then I could also run this and see if something else pops up |
You can clone the repo and run |
:/ was a bit tricky to get the correct image but I managed it. Sadly there is an error popping up:
coming from: Line 343 in afd2a1d
The simple way of commenting the line seems to work - but the comment indicates to me that it is important for postgres.... Update: using the correct branch should help - rebuilding right now Update 2: yes! it works! |
Yeah, it's fixed here https://github.com/tolgee/tolgee-platform/pull/1405/files#diff-b7d4751a11611455d0032b401f73be0b04084e153680caabdeecfdb0c33673d0R346 |
This issue is stale because it has been open for 30 days with no activity. |
Hi :)
I've just setup Tolgee with CockroachDB (it's made to run without masters on kuberenets). With the initial Setup there were only 3 minor errors with the following migrations:
is there perhaps a way to generate the api keys without the triggers?
The text was updated successfully, but these errors were encountered: