-
Notifications
You must be signed in to change notification settings - Fork 1.5k
BoR scheduled posts and drafts #9352
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
base: main
Are you sure you want to change the base?
Conversation
Coverage Comparison ReportGenerated on December 15, 2025 at 05:34:29 UTC |
enahum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the amount of comments
app/database/models/server/draft.ts
Outdated
| @field('update_at') updateAt!: number; | ||
|
|
||
| /** type : The type of post */ | ||
| @field('type') type?: PostTypesUserCreatable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes it undefined, not null.. the database can store null not undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see. Thats why we have many fields defined with as fieldName: Type | null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| @field('error_code') errorCode!: string; | ||
|
|
||
| /** type : The type of the post being scheduled */ | ||
| @field('type') type?: PostTypesUserCreatable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| scheduledPost.processedAt = raw.processed_at ?? 0; | ||
| scheduledPost.errorCode = raw.error_code || scheduledPost.errorCode; | ||
|
|
||
| // LOL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here we go again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Removed with updated code.
| {name: 'root_id', type: 'string', isIndexed: true}, | ||
| {name: 'metadata', type: 'string', isOptional: true}, | ||
| {name: 'update_at', type: 'number'}, | ||
| {name: 'type', type: 'string'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing isOptional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| {name: 'scheduled_at', type: 'number'}, | ||
| {name: 'processed_at', type: 'number'}, | ||
| {name: 'error_code', type: 'string'}, | ||
| {name: 'type', type: 'string'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing isOptional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
app/database/schema/server/test.ts
Outdated
| scheduled_at: {name: 'scheduled_at', type: 'number'}, | ||
| processed_at: {name: 'processed_at', type: 'number'}, | ||
| error_code: {name: 'error_code', type: 'string'}, | ||
| type: {name: 'type', type: 'string'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing isOptional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
app/database/schema/server/test.ts
Outdated
| {name: 'scheduled_at', type: 'number'}, | ||
| {name: 'processed_at', type: 'number'}, | ||
| {name: 'error_code', type: 'string'}, | ||
| {name: 'type', type: 'string'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing isOptional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fail to see the reason for this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always get these two diffs - project.pbxproj and Podfile.lockfile. What version of xcode and cocoapods do you use? I'm on xcode 26.1 and pod 1.16.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same version, let's just remove this change and the Podfile.lock as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| updateAt: number; | ||
|
|
||
| /** type : The post type of draft */ | ||
| type?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| type?: string; | |
| type: string | null; |
this aligns better unless you plan to have the transformer set it to null if undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
enahum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with the condition to revert the changes in the project and podfile lock files
|
@amyblais this isn't necessary for upcoming code freeze date. This can be part of the later release. |
Summary
Added DB migration for adding
typecolumn to Scheduled Post and Draft tables.Ticket Link
Fixes https://mattermost.atlassian.net/browse/MM-66947
Checklist
E2E iOS tests for PR.Device Information
This PR was tested on: iOS emulator
Screenshots
NA
Release Note