Clean up AttachmentTable schema.

This commit is contained in:
Greyson Parrelli
2024-01-09 09:21:23 -05:00
committed by Alex Hart
parent 62b142cdeb
commit fe39b5e4e2
40 changed files with 486 additions and 502 deletions

View File

@@ -214,7 +214,7 @@ class UploadDependencyGraphTest {
val uploadData = AttachmentUploadJobData.ADAPTER.decode(steps[1][0].serialize()!!)
val copyData = JsonJobData.deserialize(steps[2][0].serialize())
val uploadAttachmentId = AttachmentId(uploadData.attachmentRowId, uploadData.attachmentUniqueId)
val uploadAttachmentId = AttachmentId(uploadData.attachmentId)
val copySourceAttachmentId = JsonUtils.fromJson(copyData.getString("source_id"), AttachmentId::class.java)
assertEquals(uploadAttachmentId, copySourceAttachmentId)
@@ -228,7 +228,7 @@ class UploadDependencyGraphTest {
private fun getAttachmentForPreUpload(id: Long, attachment: Attachment): DatabaseAttachment {
return DatabaseAttachment(
attachmentId = AttachmentId(id, id),
attachmentId = AttachmentId(id),
mmsId = AttachmentTable.PREUPLOAD_MESSAGE_ID,
hasData = false,
hasThumbnail = false,
@@ -237,10 +237,9 @@ class UploadDependencyGraphTest {
size = attachment.size,
fileName = attachment.fileName,
cdnNumber = attachment.cdnNumber,
location = attachment.location,
key = attachment.key,
relay = attachment.relay,
digest = attachment.digest,
location = attachment.remoteLocation,
key = attachment.remoteKey,
digest = attachment.remoteDigest,
incrementalDigest = attachment.incrementalDigest,
incrementalMacChunkSize = attachment.incrementalMacChunkSize,
fastPreflightId = attachment.fastPreflightId,

View File

@@ -84,7 +84,7 @@ class StoriesTest {
val messageRecord = FakeMessageRecords.buildMediaMmsMessageRecord(
linkPreviews = listOf(
FakeMessageRecords.buildLinkPreview(
attachmentId = AttachmentId(1, 2)
attachmentId = AttachmentId(1)
)
)
)

View File

@@ -42,7 +42,7 @@ class StoryContextMenuTest {
@Test
fun `Given a story with an attachment, when I share, then I expect the correct stream, type, and flag`() {
// GIVEN
val attachmentId = AttachmentId(1, 2)
val attachmentId = AttachmentId(1)
val storyRecord = FakeMessageRecords.buildMediaMmsMessageRecord(
storyType = StoryType.STORY_WITH_REPLIES,
slideDeck = SlideDeck().apply {