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

Change older Paperclip database migrations for consistency #30204

Merged
merged 1 commit into from May 20, 2024

Conversation

ClearlyClaire
Copy link
Contributor

First part of an alternative to #29263, as discussed in #30203 (comment)

cc @mjankowski

@ClearlyClaire ClearlyClaire requested review from mjankowski and a team May 7, 2024 09:05
@mjankowski
Copy link
Contributor

Is the idea here to focus more narrowly on the schema/migration disconnect (by restoring old migrations to their original output), and either not bother with, or at least skip for now, the bigint solution to the potential size issue?

@ClearlyClaire
Copy link
Contributor Author

What potential size issues are you referring to?

@mjankowski
Copy link
Contributor

Sorry, I just meant that there were sort of two issues dealt with in the migrations:

  • The consistency issue of the changing column type in the paperclip migrations meaning that the migrations were generating a different schema.rb than what was actually in the repo schema.rb (due to older vs newer versions)
  • The actual issue that the paperclip change was dealing with (the int type limiting the ceiling of storable file sizes)

So I was asking if the plan here is to deal with the first issue by changing the old migrations, and ignore the file size storage issue (maybe this is OK ... I think it's a ~2GB size where you hit the limit, which is well above the default limits for these attachments...)

@ClearlyClaire
Copy link
Contributor Author

Yes, I don't think we have a need to go to bigint, the integer limit is basically 2GB. Our current limit for the largest file types is 99MB.

@mjankowski
Copy link
Contributor

Cool - in that case I agree with the already done revert, and with this approach to aligning the old migrations with the schema.

@sinoru
Copy link
Sponsor Contributor

sinoru commented May 9, 2024

Yes, I don't think we have a need to go to bigint, the integer limit is basically 2GB. Our current limit for the largest file types is 99MB.

@ClearlyClaire @mjankowski Is this not applied to Backup? Just for confirmation.

@mjankowski
Copy link
Contributor

@ClearlyClaire @mjankowski Is this not applied to [Backup]

The dump_file_size column on backups table is already a bigint.

@sinoru
Copy link
Sponsor Contributor

sinoru commented May 11, 2024

@ClearlyClaire @mjankowski Is this not applied to [Backup]

The dump_file_size column on backups table is already a bigint.

Oh, That's fine...

@ClearlyClaire ClearlyClaire added this pull request to the merge queue May 20, 2024
Merged via the queue into main with commit 00cf8d3 May 20, 2024
47 checks passed
@ClearlyClaire ClearlyClaire deleted the fixes/bingint-integer-confusion branch May 20, 2024 15:04
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.

None yet

4 participants