-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix: objectId size for Pointer in Postgres #6619
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6619 +/- ##
=======================================
Coverage 93.91% 93.91%
=======================================
Files 169 169
Lines 11972 11972
=======================================
Hits 11243 11243
Misses 729 729 Continue to review full report at Codecov.
|
…on Postgres before the addition of previous commit
Would this work for existing tables with |
@dplewis I left the test case in for char(10), parse-server/spec/rest.spec.js Line 454 in a5ef0be
and added a test case for larger. I think most of the tests in the suite uses the standard objectId, so does that mean it will work for existing tables? |
I've did the following tests to confirm the old type of "character(10)" still works the change here:
The potential issue will be if an administrator wants wants to upgrade the objectId's of a table that was created in parse server 4.2.0 or lower to an objectId size greater than 10. In order to do this, they will probably need to do an "ALTER Table..." to change the char(10) to "text" and then go through the respective tables and update the objectId with the new larger one (at least for the pointer values). It seems postgres will need to lock the tables for this change which will cause for some down time on large db's. Regardless of the change in this PR, an administrator would still have to go through those steps if they started on an earlier version of parse server and want to upgrade to larger objectId sizes |
This was my main concern with this patch. Either we document the migration steps or add the alter table to the performInitialization function in the PG adapter. But like you said their might be down time. |
@dplewis I think my comment might have been a little confusing. There's no downtime with the patch. People already using 10 character objectId's will still function fine based on the tests I mentioned. There will be downtime however, if someone wanted to increase their objectId from 10 to a larger value, which, this downtime will have to happen regardless of this patch is added or not, because they will have to convert their objectIds using Alter table. I used the patch with an older parse-server with no problem, no conversion using Alter table.
|
Close #6616