cockroachdb support #153

Open
opened 2025-07-08 08:41:20 -04:00 by AtHeartEngineer · 0 comments

Originally created by @haras-unicorn on 3/15/2025

2020-08-02-025025_add_favorites_table migration patch applied from support for cockroachdb discussion.
The reason the migration had to be split is because create table and insert fail in the same transaction in cockroachdb.

Specified INT4 instead of INTEGER datatype in all postgresql migrations because postgresql uses 32-bit integers by default while cockroachdb uses 64-bit integers by default.

Tested on version 1.33.0 and can confirm migrations work on my machine for what its worth.

I was able to make a user account and import all of my keepassxc stuff without a hitch.
For me this functionality is enough so I'll open this up for review but I'd still greatly appreciate other people testing because I only did basic tests to confirm functionality that I'm interested in works.

*Originally created by @haras-unicorn on 3/15/2025* `2020-08-02-025025_add_favorites_table` migration patch applied from [support for cockroachdb discussion](https://github.com/dani-garcia/vaultwarden/discussions/2689). The reason the migration had to be split is because [create table and insert fail in the same transaction in cockroachdb](https://github.com/cockroachdb/cockroach/issues/14548). Specified `INT4` instead of `INTEGER` datatype in all postgresql migrations because [postgresql uses 32-bit integers by default](https://www.postgresql.org/docs/current/datatype-numeric.html) while [cockroachdb uses 64-bit integers by default](https://www.cockroachlabs.com/docs/stable/int). Tested on version 1.33.0 and can confirm migrations work on my machine for what its worth. I was able to make a user account and import all of my keepassxc stuff without a hitch. For me this functionality is enough so I'll open this up for review but I'd still greatly appreciate other people testing because I only did basic tests to confirm functionality that I'm interested in works.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#153