diff --git a/modules/common_resource/src/main/res/values-ja/strings.xml b/modules/common_resource/src/main/res/values-ja/strings.xml
index 7d2ffb7c91..8658a5d778 100644
--- a/modules/common_resource/src/main/res/values-ja/strings.xml
+++ b/modules/common_resource/src/main/res/values-ja/strings.xml
@@ -630,14 +630,15 @@
カスタム絵文字ダウンロード中
アラームの権限を付与してください
予約投稿はアラーム機能の仕組みを利用するため、設定からMilkteaにアラームの権限を付与する必要性があります。
- Exclude replies
- Exclude reposts
+ リプライを除外
+ リポストを除外
投稿の通知を受信する
投稿の通知をやめる
ユーザキャッシュ
新着投稿を表示
+ センシティブなメディアを含む投稿を除外
diff --git a/modules/common_resource/src/main/res/values-zh/strings.xml b/modules/common_resource/src/main/res/values-zh/strings.xml
index 97953c4599..6633959588 100644
--- a/modules/common_resource/src/main/res/values-zh/strings.xml
+++ b/modules/common_resource/src/main/res/values-zh/strings.xml
@@ -628,6 +628,7 @@
User caches
Jump to new post
+ Exclude if exists senstive media
\ No newline at end of file
diff --git a/modules/common_resource/src/main/res/values/strings.xml b/modules/common_resource/src/main/res/values/strings.xml
index 1af6a27fb6..4ae3a23c94 100644
--- a/modules/common_resource/src/main/res/values/strings.xml
+++ b/modules/common_resource/src/main/res/values/strings.xml
@@ -635,6 +635,7 @@
Stop notify about new posts
User cache
Jump to new post
+ Exclude if exists sensitive media
diff --git a/modules/data/schemas/net.pantasystem.milktea.data.infrastructure.DataBase/58.json b/modules/data/schemas/net.pantasystem.milktea.data.infrastructure.DataBase/58.json
index 56d2a57cb7..97e6d25a1b 100644
--- a/modules/data/schemas/net.pantasystem.milktea.data.infrastructure.DataBase/58.json
+++ b/modules/data/schemas/net.pantasystem.milktea.data.infrastructure.DataBase/58.json
@@ -2,7 +2,7 @@
"formatVersion": 1,
"database": {
"version": 58,
- "identityHash": "abeea00a832ef048d99e46fb3c1751c6",
+ "identityHash": "9257b02f1c5fb08f3a6b602d66676be8",
"entities": [
{
"tableName": "reaction_history",
@@ -475,7 +475,7 @@
},
{
"tableName": "page_table",
- "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `title` TEXT NOT NULL, `weight` INTEGER NOT NULL, `isSavePagePosition` INTEGER, `attachedAccountId` INTEGER, `pageId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` TEXT NOT NULL, `withFiles` INTEGER, `excludeNsfw` INTEGER, `includeLocalRenotes` INTEGER, `includeMyRenotes` INTEGER, `includeRenotedMyRenotes` INTEGER, `listId` TEXT, `following` INTEGER, `visibility` TEXT, `noteId` TEXT, `tag` TEXT, `reply` INTEGER, `renote` INTEGER, `poll` INTEGER, `offset` INTEGER, `markAsRead` INTEGER, `userId` TEXT, `includeReplies` INTEGER, `query` TEXT, `host` TEXT, `antennaId` TEXT, `channelId` TEXT, `clipId` TEXT, `excludeReplies` INTEGER, `excludeReposts` INTEGER)",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `title` TEXT NOT NULL, `weight` INTEGER NOT NULL, `isSavePagePosition` INTEGER, `attachedAccountId` INTEGER, `pageId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` TEXT NOT NULL, `withFiles` INTEGER, `excludeNsfw` INTEGER, `includeLocalRenotes` INTEGER, `includeMyRenotes` INTEGER, `includeRenotedMyRenotes` INTEGER, `listId` TEXT, `following` INTEGER, `visibility` TEXT, `noteId` TEXT, `tag` TEXT, `reply` INTEGER, `renote` INTEGER, `poll` INTEGER, `offset` INTEGER, `markAsRead` INTEGER, `userId` TEXT, `includeReplies` INTEGER, `query` TEXT, `host` TEXT, `antennaId` TEXT, `channelId` TEXT, `clipId` TEXT, `excludeReplies` INTEGER, `excludeReposts` INTEGER, `excludeIfExistsSensitiveMedia` INTEGER)",
"fields": [
{
"fieldPath": "accountId",
@@ -662,6 +662,12 @@
"columnName": "excludeReposts",
"affinity": "INTEGER",
"notNull": false
+ },
+ {
+ "fieldPath": "pageParams.excludeIfExistsSensitiveMedia",
+ "columnName": "excludeIfExistsSensitiveMedia",
+ "affinity": "INTEGER",
+ "notNull": false
}
],
"primaryKey": {
@@ -3265,7 +3271,7 @@
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
- "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'abeea00a832ef048d99e46fb3c1751c6')"
+ "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '9257b02f1c5fb08f3a6b602d66676be8')"
]
}
}
\ No newline at end of file
diff --git a/modules/data/schemas/net.pantasystem.milktea.data.infrastructure.DataBase/59.json b/modules/data/schemas/net.pantasystem.milktea.data.infrastructure.DataBase/59.json
new file mode 100644
index 0000000000..4d96e444dc
--- /dev/null
+++ b/modules/data/schemas/net.pantasystem.milktea.data.infrastructure.DataBase/59.json
@@ -0,0 +1,3277 @@
+{
+ "formatVersion": 1,
+ "database": {
+ "version": 59,
+ "identityHash": "9257b02f1c5fb08f3a6b602d66676be8",
+ "entities": [
+ {
+ "tableName": "reaction_history",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`reaction` TEXT NOT NULL, `instance_domain` TEXT NOT NULL, `accountId` INTEGER, `target_post_id` TEXT, `target_user_id` TEXT, `id` INTEGER PRIMARY KEY AUTOINCREMENT)",
+ "fields": [
+ {
+ "fieldPath": "reaction",
+ "columnName": "reaction",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "instanceDomain",
+ "columnName": "instance_domain",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "targetPostId",
+ "columnName": "target_post_id",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "targetUserId",
+ "columnName": "target_user_id",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "reaction_user_setting",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`reaction` TEXT NOT NULL, `instance_domain` TEXT NOT NULL, `weight` INTEGER NOT NULL, PRIMARY KEY(`reaction`, `instance_domain`))",
+ "fields": [
+ {
+ "fieldPath": "reaction",
+ "columnName": "reaction",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "instanceDomain",
+ "columnName": "instance_domain",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "weight",
+ "columnName": "weight",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "reaction",
+ "instance_domain"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "poll_choice_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`choice` TEXT NOT NULL, `draft_note_id` INTEGER NOT NULL, `weight` INTEGER NOT NULL, PRIMARY KEY(`choice`, `weight`, `draft_note_id`), FOREIGN KEY(`draft_note_id`) REFERENCES `draft_note_table`(`draft_note_id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "choice",
+ "columnName": "choice",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "draftNoteId",
+ "columnName": "draft_note_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "weight",
+ "columnName": "weight",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "choice",
+ "weight",
+ "draft_note_id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_poll_choice_table_draft_note_id_choice",
+ "unique": false,
+ "columnNames": [
+ "draft_note_id",
+ "choice"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_poll_choice_table_draft_note_id_choice` ON `${TABLE_NAME}` (`draft_note_id`, `choice`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "draft_note_table",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "draft_note_id"
+ ],
+ "referencedColumns": [
+ "draft_note_id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user_id",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`userId` TEXT NOT NULL, `draft_note_id` INTEGER NOT NULL, PRIMARY KEY(`userId`, `draft_note_id`), FOREIGN KEY(`draft_note_id`) REFERENCES `draft_note_table`(`draft_note_id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "draftNoteId",
+ "columnName": "draft_note_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "userId",
+ "draft_note_id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_id_draft_note_id",
+ "unique": false,
+ "columnNames": [
+ "draft_note_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_id_draft_note_id` ON `${TABLE_NAME}` (`draft_note_id`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "draft_note_table",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "draft_note_id"
+ ],
+ "referencedColumns": [
+ "draft_note_id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "draft_note_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `visibility` TEXT NOT NULL, `text` TEXT, `cw` TEXT, `viaMobile` INTEGER, `localOnly` INTEGER, `noExtractMentions` INTEGER, `noExtractHashtags` INTEGER, `noExtractEmojis` INTEGER, `replyId` TEXT, `renoteId` TEXT, `channelId` TEXT, `scheduleWillPostAt` TEXT, `draft_note_id` INTEGER PRIMARY KEY AUTOINCREMENT, `isSensitive` INTEGER, `reactionAcceptanceType` TEXT, `multiple` INTEGER, `expiresAt` INTEGER, FOREIGN KEY(`accountId`) REFERENCES `account_table`(`accountId`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "visibility",
+ "columnName": "visibility",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "text",
+ "columnName": "text",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "cw",
+ "columnName": "cw",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "viaMobile",
+ "columnName": "viaMobile",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "localOnly",
+ "columnName": "localOnly",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "noExtractMentions",
+ "columnName": "noExtractMentions",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "noExtractHashtags",
+ "columnName": "noExtractHashtags",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "noExtractEmojis",
+ "columnName": "noExtractEmojis",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "replyId",
+ "columnName": "replyId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "renoteId",
+ "columnName": "renoteId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "channelId",
+ "columnName": "channelId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "scheduleWillPostAt",
+ "columnName": "scheduleWillPostAt",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "draftNoteId",
+ "columnName": "draft_note_id",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "isSensitive",
+ "columnName": "isSensitive",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "reactionAcceptanceType",
+ "columnName": "reactionAcceptanceType",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "poll.multiple",
+ "columnName": "multiple",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "poll.expiresAt",
+ "columnName": "expiresAt",
+ "affinity": "INTEGER",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "draft_note_id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_draft_note_table_accountId_text",
+ "unique": false,
+ "columnNames": [
+ "accountId",
+ "text"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_draft_note_table_accountId_text` ON `${TABLE_NAME}` (`accountId`, `text`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "account_table",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "accountId"
+ ],
+ "referencedColumns": [
+ "accountId"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "url_preview",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`url` TEXT NOT NULL, `title` TEXT NOT NULL, `icon` TEXT, `description` TEXT, `thumbnail` TEXT, `siteName` TEXT, `createdAt` TEXT, PRIMARY KEY(`url`))",
+ "fields": [
+ {
+ "fieldPath": "url",
+ "columnName": "url",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "icon",
+ "columnName": "icon",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "description",
+ "columnName": "description",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "thumbnail",
+ "columnName": "thumbnail",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "siteName",
+ "columnName": "siteName",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "createdAt",
+ "columnName": "createdAt",
+ "affinity": "TEXT",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "url"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "account_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`remoteId` TEXT NOT NULL, `instanceDomain` TEXT NOT NULL, `userName` TEXT NOT NULL, `encryptedToken` TEXT NOT NULL, `instanceType` TEXT NOT NULL DEFAULT 'misskey', `accountId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)",
+ "fields": [
+ {
+ "fieldPath": "remoteId",
+ "columnName": "remoteId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "instanceDomain",
+ "columnName": "instanceDomain",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userName",
+ "columnName": "userName",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "encryptedToken",
+ "columnName": "encryptedToken",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "instanceType",
+ "columnName": "instanceType",
+ "affinity": "TEXT",
+ "notNull": true,
+ "defaultValue": "'misskey'"
+ },
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "accountId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_account_table_remoteId",
+ "unique": false,
+ "columnNames": [
+ "remoteId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_account_table_remoteId` ON `${TABLE_NAME}` (`remoteId`)"
+ },
+ {
+ "name": "index_account_table_instanceDomain",
+ "unique": false,
+ "columnNames": [
+ "instanceDomain"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_account_table_instanceDomain` ON `${TABLE_NAME}` (`instanceDomain`)"
+ },
+ {
+ "name": "index_account_table_userName",
+ "unique": false,
+ "columnNames": [
+ "userName"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_account_table_userName` ON `${TABLE_NAME}` (`userName`)"
+ }
+ ],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "page_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `title` TEXT NOT NULL, `weight` INTEGER NOT NULL, `isSavePagePosition` INTEGER, `attachedAccountId` INTEGER, `pageId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` TEXT NOT NULL, `withFiles` INTEGER, `excludeNsfw` INTEGER, `includeLocalRenotes` INTEGER, `includeMyRenotes` INTEGER, `includeRenotedMyRenotes` INTEGER, `listId` TEXT, `following` INTEGER, `visibility` TEXT, `noteId` TEXT, `tag` TEXT, `reply` INTEGER, `renote` INTEGER, `poll` INTEGER, `offset` INTEGER, `markAsRead` INTEGER, `userId` TEXT, `includeReplies` INTEGER, `query` TEXT, `host` TEXT, `antennaId` TEXT, `channelId` TEXT, `clipId` TEXT, `excludeReplies` INTEGER, `excludeReposts` INTEGER, `excludeIfExistsSensitiveMedia` INTEGER)",
+ "fields": [
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "weight",
+ "columnName": "weight",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isSavePagePosition",
+ "columnName": "isSavePagePosition",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "attachedAccountId",
+ "columnName": "attachedAccountId",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageId",
+ "columnName": "pageId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "pageParams.type",
+ "columnName": "type",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "pageParams.withFiles",
+ "columnName": "withFiles",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.excludeNsfw",
+ "columnName": "excludeNsfw",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.includeLocalRenotes",
+ "columnName": "includeLocalRenotes",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.includeMyRenotes",
+ "columnName": "includeMyRenotes",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.includeRenotedMyRenotes",
+ "columnName": "includeRenotedMyRenotes",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.listId",
+ "columnName": "listId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.following",
+ "columnName": "following",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.visibility",
+ "columnName": "visibility",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.noteId",
+ "columnName": "noteId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.tag",
+ "columnName": "tag",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.reply",
+ "columnName": "reply",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.renote",
+ "columnName": "renote",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.poll",
+ "columnName": "poll",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.offset",
+ "columnName": "offset",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.markAsRead",
+ "columnName": "markAsRead",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.userId",
+ "columnName": "userId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.includeReplies",
+ "columnName": "includeReplies",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.query",
+ "columnName": "query",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.host",
+ "columnName": "host",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.antennaId",
+ "columnName": "antennaId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.channelId",
+ "columnName": "channelId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.clipId",
+ "columnName": "clipId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.excludeReplies",
+ "columnName": "excludeReplies",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.excludeReposts",
+ "columnName": "excludeReposts",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "pageParams.excludeIfExistsSensitiveMedia",
+ "columnName": "excludeIfExistsSensitiveMedia",
+ "affinity": "INTEGER",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "pageId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_page_table_weight",
+ "unique": false,
+ "columnNames": [
+ "weight"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_page_table_weight` ON `${TABLE_NAME}` (`weight`)"
+ },
+ {
+ "name": "index_page_table_accountId",
+ "unique": false,
+ "columnNames": [
+ "accountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_page_table_accountId` ON `${TABLE_NAME}` (`accountId`)"
+ }
+ ],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "meta_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uri` TEXT NOT NULL, `bannerUrl` TEXT, `cacheRemoteFiles` INTEGER, `description` TEXT, `disableGlobalTimeline` INTEGER, `disableLocalTimeline` INTEGER, `disableRegistration` INTEGER, `driveCapacityPerLocalUserMb` INTEGER, `driveCapacityPerRemoteUserMb` INTEGER, `enableDiscordIntegration` INTEGER, `enableEmail` INTEGER, `enableEmojiReaction` INTEGER, `enableGithubIntegration` INTEGER, `enableRecaptcha` INTEGER, `enableServiceWorker` INTEGER, `enableTwitterIntegration` INTEGER, `errorImageUrl` TEXT, `feedbackUrl` TEXT, `iconUrl` TEXT, `maintainerEmail` TEXT, `maintainerName` TEXT, `mascotImageUrl` TEXT, `maxNoteTextLength` INTEGER, `name` TEXT, `recaptchaSiteKey` TEXT, `secure` INTEGER, `swPublicKey` TEXT, `toSUrl` TEXT, `version` TEXT NOT NULL, PRIMARY KEY(`uri`))",
+ "fields": [
+ {
+ "fieldPath": "uri",
+ "columnName": "uri",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "bannerUrl",
+ "columnName": "bannerUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "cacheRemoteFiles",
+ "columnName": "cacheRemoteFiles",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "description",
+ "columnName": "description",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "disableGlobalTimeline",
+ "columnName": "disableGlobalTimeline",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "disableLocalTimeline",
+ "columnName": "disableLocalTimeline",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "disableRegistration",
+ "columnName": "disableRegistration",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "driveCapacityPerLocalUserMb",
+ "columnName": "driveCapacityPerLocalUserMb",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "driveCapacityPerRemoteUserMb",
+ "columnName": "driveCapacityPerRemoteUserMb",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "enableDiscordIntegration",
+ "columnName": "enableDiscordIntegration",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "enableEmail",
+ "columnName": "enableEmail",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "enableEmojiReaction",
+ "columnName": "enableEmojiReaction",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "enableGithubIntegration",
+ "columnName": "enableGithubIntegration",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "enableRecaptcha",
+ "columnName": "enableRecaptcha",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "enableServiceWorker",
+ "columnName": "enableServiceWorker",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "enableTwitterIntegration",
+ "columnName": "enableTwitterIntegration",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "errorImageUrl",
+ "columnName": "errorImageUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "feedbackUrl",
+ "columnName": "feedbackUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "iconUrl",
+ "columnName": "iconUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "maintainerEmail",
+ "columnName": "maintainerEmail",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "maintainerName",
+ "columnName": "maintainerName",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "mascotImageUrl",
+ "columnName": "mascotImageUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "maxNoteTextLength",
+ "columnName": "maxNoteTextLength",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "recaptchaSiteKey",
+ "columnName": "recaptchaSiteKey",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "secure",
+ "columnName": "secure",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "swPublicKey",
+ "columnName": "swPublicKey",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "toSUrl",
+ "columnName": "toSUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "version",
+ "columnName": "version",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "uri"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "unread_notifications_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `notificationId` TEXT NOT NULL, PRIMARY KEY(`accountId`, `notificationId`), FOREIGN KEY(`accountId`) REFERENCES `account_table`(`accountId`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "notificationId",
+ "columnName": "notificationId",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "accountId",
+ "notificationId"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": [
+ {
+ "table": "account_table",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "accountId"
+ ],
+ "referencedColumns": [
+ "accountId"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "nicknames",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`nickname` TEXT NOT NULL, `username` TEXT NOT NULL, `host` TEXT NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)",
+ "fields": [
+ {
+ "fieldPath": "nickname",
+ "columnName": "nickname",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userName",
+ "columnName": "username",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "host",
+ "columnName": "host",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_nicknames_username_host",
+ "unique": true,
+ "columnNames": [
+ "username",
+ "host"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_nicknames_username_host` ON `${TABLE_NAME}` (`username`, `host`)"
+ }
+ ],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "drive_file_v1",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`serverId` TEXT NOT NULL, `relatedAccountId` INTEGER NOT NULL, `createdAt` TEXT, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `md5` TEXT, `size` INTEGER, `url` TEXT NOT NULL, `isSensitive` INTEGER NOT NULL, `thumbnailUrl` TEXT, `folderId` TEXT, `userId` TEXT, `comment` TEXT, `blurhash` TEXT, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`relatedAccountId`) REFERENCES `account_table`(`accountId`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "serverId",
+ "columnName": "serverId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "relatedAccountId",
+ "columnName": "relatedAccountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "createdAt",
+ "columnName": "createdAt",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "type",
+ "columnName": "type",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "md5",
+ "columnName": "md5",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "size",
+ "columnName": "size",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "url",
+ "columnName": "url",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isSensitive",
+ "columnName": "isSensitive",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "thumbnailUrl",
+ "columnName": "thumbnailUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "folderId",
+ "columnName": "folderId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "comment",
+ "columnName": "comment",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "blurhash",
+ "columnName": "blurhash",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_drive_file_v1_serverId_relatedAccountId",
+ "unique": true,
+ "columnNames": [
+ "serverId",
+ "relatedAccountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_drive_file_v1_serverId_relatedAccountId` ON `${TABLE_NAME}` (`serverId`, `relatedAccountId`)"
+ },
+ {
+ "name": "index_drive_file_v1_serverId",
+ "unique": false,
+ "columnNames": [
+ "serverId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_drive_file_v1_serverId` ON `${TABLE_NAME}` (`serverId`)"
+ },
+ {
+ "name": "index_drive_file_v1_relatedAccountId",
+ "unique": false,
+ "columnNames": [
+ "relatedAccountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_drive_file_v1_relatedAccountId` ON `${TABLE_NAME}` (`relatedAccountId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "account_table",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "relatedAccountId"
+ ],
+ "referencedColumns": [
+ "accountId"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "draft_file_v2_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`draftNoteId` INTEGER NOT NULL, `filePropertyId` INTEGER, `localFileId` INTEGER, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`filePropertyId`) REFERENCES `drive_file_v1`(`id`) ON UPDATE NO ACTION ON DELETE SET NULL , FOREIGN KEY(`localFileId`) REFERENCES `draft_local_file_v2_table`(`localFileId`) ON UPDATE NO ACTION ON DELETE SET NULL )",
+ "fields": [
+ {
+ "fieldPath": "draftNoteId",
+ "columnName": "draftNoteId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "filePropertyId",
+ "columnName": "filePropertyId",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "localFileId",
+ "columnName": "localFileId",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_draft_file_v2_table_draftNoteId_filePropertyId_localFileId",
+ "unique": true,
+ "columnNames": [
+ "draftNoteId",
+ "filePropertyId",
+ "localFileId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_draft_file_v2_table_draftNoteId_filePropertyId_localFileId` ON `${TABLE_NAME}` (`draftNoteId`, `filePropertyId`, `localFileId`)"
+ },
+ {
+ "name": "index_draft_file_v2_table_draftNoteId",
+ "unique": false,
+ "columnNames": [
+ "draftNoteId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_draft_file_v2_table_draftNoteId` ON `${TABLE_NAME}` (`draftNoteId`)"
+ },
+ {
+ "name": "index_draft_file_v2_table_localFileId",
+ "unique": false,
+ "columnNames": [
+ "localFileId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_draft_file_v2_table_localFileId` ON `${TABLE_NAME}` (`localFileId`)"
+ },
+ {
+ "name": "index_draft_file_v2_table_filePropertyId",
+ "unique": false,
+ "columnNames": [
+ "filePropertyId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_draft_file_v2_table_filePropertyId` ON `${TABLE_NAME}` (`filePropertyId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "drive_file_v1",
+ "onDelete": "SET NULL",
+ "onUpdate": "NO ACTION",
+ "columns": [
+ "filePropertyId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ },
+ {
+ "table": "draft_local_file_v2_table",
+ "onDelete": "SET NULL",
+ "onUpdate": "NO ACTION",
+ "columns": [
+ "localFileId"
+ ],
+ "referencedColumns": [
+ "localFileId"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "draft_local_file_v2_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `file_path` TEXT NOT NULL, `is_sensitive` INTEGER, `type` TEXT NOT NULL, `thumbnailUrl` TEXT, `folder_id` TEXT, `file_size` INTEGER, `comment` TEXT, `localFileId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)",
+ "fields": [
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "filePath",
+ "columnName": "file_path",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isSensitive",
+ "columnName": "is_sensitive",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "type",
+ "columnName": "type",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "thumbnailUrl",
+ "columnName": "thumbnailUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "folderId",
+ "columnName": "folder_id",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "fileSize",
+ "columnName": "file_size",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "comment",
+ "columnName": "comment",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "localFileId",
+ "columnName": "localFileId",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "localFileId"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "group_v1",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`serverId` TEXT NOT NULL, `accountId` INTEGER NOT NULL, `createdAt` TEXT NOT NULL, `name` TEXT NOT NULL, `ownerId` TEXT NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account_table`(`accountId`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "serverId",
+ "columnName": "serverId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "createdAt",
+ "columnName": "createdAt",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "ownerId",
+ "columnName": "ownerId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_group_v1_accountId",
+ "unique": false,
+ "columnNames": [
+ "accountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_group_v1_accountId` ON `${TABLE_NAME}` (`accountId`)"
+ },
+ {
+ "name": "index_group_v1_serverId",
+ "unique": false,
+ "columnNames": [
+ "serverId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_group_v1_serverId` ON `${TABLE_NAME}` (`serverId`)"
+ },
+ {
+ "name": "index_group_v1_accountId_serverId",
+ "unique": true,
+ "columnNames": [
+ "accountId",
+ "serverId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_group_v1_accountId_serverId` ON `${TABLE_NAME}` (`accountId`, `serverId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "account_table",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "accountId"
+ ],
+ "referencedColumns": [
+ "accountId"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "group_member_v1",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`groupId` INTEGER NOT NULL, `userId` TEXT NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`groupId`) REFERENCES `group_v1`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "groupId",
+ "columnName": "groupId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_group_member_v1_groupId",
+ "unique": false,
+ "columnNames": [
+ "groupId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_group_member_v1_groupId` ON `${TABLE_NAME}` (`groupId`)"
+ },
+ {
+ "name": "index_group_member_v1_groupId_userId",
+ "unique": true,
+ "columnNames": [
+ "groupId",
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_group_member_v1_groupId_userId` ON `${TABLE_NAME}` (`groupId`, `userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "group_v1",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "groupId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`serverId` TEXT NOT NULL, `accountId` INTEGER NOT NULL, `userName` TEXT NOT NULL, `name` TEXT, `avatarUrl` TEXT, `isCat` INTEGER, `isBot` INTEGER, `host` TEXT NOT NULL, `isSameHost` INTEGER NOT NULL, `avatarBlurhash` TEXT, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account_table`(`accountId`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "serverId",
+ "columnName": "serverId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userName",
+ "columnName": "userName",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "avatarUrl",
+ "columnName": "avatarUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "isCat",
+ "columnName": "isCat",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "isBot",
+ "columnName": "isBot",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "host",
+ "columnName": "host",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isSameHost",
+ "columnName": "isSameHost",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "avatarBlurhash",
+ "columnName": "avatarBlurhash",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_serverId_accountId",
+ "unique": true,
+ "columnNames": [
+ "serverId",
+ "accountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_user_serverId_accountId` ON `${TABLE_NAME}` (`serverId`, `accountId`)"
+ },
+ {
+ "name": "index_user_userName",
+ "unique": false,
+ "columnNames": [
+ "userName"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_userName` ON `${TABLE_NAME}` (`userName`)"
+ },
+ {
+ "name": "index_user_accountId",
+ "unique": false,
+ "columnNames": [
+ "accountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_accountId` ON `${TABLE_NAME}` (`accountId`)"
+ },
+ {
+ "name": "index_user_host",
+ "unique": false,
+ "columnNames": [
+ "host"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_host` ON `${TABLE_NAME}` (`host`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "account_table",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "accountId"
+ ],
+ "referencedColumns": [
+ "accountId"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user_detailed_state",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`description` TEXT, `followersCount` INTEGER, `followingCount` INTEGER, `hostLower` TEXT, `notesCount` INTEGER, `bannerUrl` TEXT, `url` TEXT, `isFollowing` INTEGER NOT NULL, `isFollower` INTEGER NOT NULL, `isBlocking` INTEGER NOT NULL, `isMuting` INTEGER NOT NULL, `hasPendingFollowRequestFromYou` INTEGER NOT NULL, `hasPendingFollowRequestToYou` INTEGER NOT NULL, `isLocked` INTEGER NOT NULL, `birthday` TEXT, `createdAt` TEXT, `updatedAt` TEXT, `publicReactions` INTEGER, `userId` INTEGER NOT NULL, PRIMARY KEY(`userId`), FOREIGN KEY(`userId`) REFERENCES `user`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "description",
+ "columnName": "description",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "followersCount",
+ "columnName": "followersCount",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "followingCount",
+ "columnName": "followingCount",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "hostLower",
+ "columnName": "hostLower",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "notesCount",
+ "columnName": "notesCount",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "bannerUrl",
+ "columnName": "bannerUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "url",
+ "columnName": "url",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "isFollowing",
+ "columnName": "isFollowing",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isFollower",
+ "columnName": "isFollower",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isBlocking",
+ "columnName": "isBlocking",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isMuting",
+ "columnName": "isMuting",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "hasPendingFollowRequestFromYou",
+ "columnName": "hasPendingFollowRequestFromYou",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "hasPendingFollowRequestToYou",
+ "columnName": "hasPendingFollowRequestToYou",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isLocked",
+ "columnName": "isLocked",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "birthday",
+ "columnName": "birthday",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "createdAt",
+ "columnName": "createdAt",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "updatedAt",
+ "columnName": "updatedAt",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "publicReactions",
+ "columnName": "publicReactions",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "userId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_detailed_state_userId",
+ "unique": true,
+ "columnNames": [
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_user_detailed_state_userId` ON `${TABLE_NAME}` (`userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "user",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "userId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user_emoji",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `url` TEXT, `uri` TEXT, `userId` INTEGER NOT NULL, `aspectRatio` REAL, `cachePath` TEXT, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`userId`) REFERENCES `user`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "url",
+ "columnName": "url",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "uri",
+ "columnName": "uri",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "aspectRatio",
+ "columnName": "aspectRatio",
+ "affinity": "REAL",
+ "notNull": false
+ },
+ {
+ "fieldPath": "cachePath",
+ "columnName": "cachePath",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_emoji_name_userId",
+ "unique": true,
+ "columnNames": [
+ "name",
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_user_emoji_name_userId` ON `${TABLE_NAME}` (`name`, `userId`)"
+ },
+ {
+ "name": "index_user_emoji_userId",
+ "unique": false,
+ "columnNames": [
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_emoji_userId` ON `${TABLE_NAME}` (`userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "user",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "userId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "pinned_note_id",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`noteId` TEXT NOT NULL, `userId` INTEGER NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`userId`) REFERENCES `user`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "noteId",
+ "columnName": "noteId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_pinned_note_id_noteId_userId",
+ "unique": true,
+ "columnNames": [
+ "noteId",
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_pinned_note_id_noteId_userId` ON `${TABLE_NAME}` (`noteId`, `userId`)"
+ },
+ {
+ "name": "index_pinned_note_id_userId",
+ "unique": false,
+ "columnNames": [
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_pinned_note_id_userId` ON `${TABLE_NAME}` (`userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "user",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "userId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user_instance_info",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`faviconUrl` TEXT, `iconUrl` TEXT, `name` TEXT, `softwareName` TEXT, `softwareVersion` TEXT, `themeColor` TEXT, `userId` INTEGER NOT NULL, PRIMARY KEY(`userId`), FOREIGN KEY(`userId`) REFERENCES `user`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "faviconUrl",
+ "columnName": "faviconUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "iconUrl",
+ "columnName": "iconUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "softwareName",
+ "columnName": "softwareName",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "softwareVersion",
+ "columnName": "softwareVersion",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "themeColor",
+ "columnName": "themeColor",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "userId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_instance_info_userId",
+ "unique": false,
+ "columnNames": [
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_instance_info_userId` ON `${TABLE_NAME}` (`userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "user",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "userId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user_profile_field",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `value` TEXT NOT NULL, `userId` INTEGER NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`userId`) REFERENCES `user`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "value",
+ "columnName": "value",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_profile_field_userId",
+ "unique": false,
+ "columnNames": [
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_profile_field_userId` ON `${TABLE_NAME}` (`userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "user",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "userId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "word_filter_condition",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "word_filter_regex_condition",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`pattern` TEXT NOT NULL, `parentId` INTEGER NOT NULL, PRIMARY KEY(`parentId`), FOREIGN KEY(`parentId`) REFERENCES `word_filter_condition`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "pattern",
+ "columnName": "pattern",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "parentId",
+ "columnName": "parentId",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "parentId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_word_filter_regex_condition_parentId",
+ "unique": false,
+ "columnNames": [
+ "parentId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_word_filter_regex_condition_parentId` ON `${TABLE_NAME}` (`parentId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "word_filter_condition",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "parentId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "word_filter_word_condition",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`word` TEXT NOT NULL, `parentId` INTEGER NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`parentId`) REFERENCES `word_filter_condition`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "word",
+ "columnName": "word",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "parentId",
+ "columnName": "parentId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_word_filter_word_condition_parentId",
+ "unique": false,
+ "columnNames": [
+ "parentId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_word_filter_word_condition_parentId` ON `${TABLE_NAME}` (`parentId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "word_filter_condition",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "parentId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user_list",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`serverId` TEXT NOT NULL, `accountId` INTEGER NOT NULL, `createdAt` TEXT NOT NULL, `name` TEXT NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account_table`(`accountId`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "serverId",
+ "columnName": "serverId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "createdAt",
+ "columnName": "createdAt",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_list_accountId",
+ "unique": false,
+ "columnNames": [
+ "accountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_list_accountId` ON `${TABLE_NAME}` (`accountId`)"
+ },
+ {
+ "name": "index_user_list_serverId",
+ "unique": false,
+ "columnNames": [
+ "serverId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_list_serverId` ON `${TABLE_NAME}` (`serverId`)"
+ },
+ {
+ "name": "index_user_list_accountId_serverId",
+ "unique": true,
+ "columnNames": [
+ "accountId",
+ "serverId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_user_list_accountId_serverId` ON `${TABLE_NAME}` (`accountId`, `serverId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "account_table",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "accountId"
+ ],
+ "referencedColumns": [
+ "accountId"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user_list_member",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`userListId` INTEGER NOT NULL, `userId` TEXT NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`userListId`) REFERENCES `user_list`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "userListId",
+ "columnName": "userListId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_list_member_userListId",
+ "unique": false,
+ "columnNames": [
+ "userListId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_list_member_userListId` ON `${TABLE_NAME}` (`userListId`)"
+ },
+ {
+ "name": "index_user_list_member_userListId_userId",
+ "unique": true,
+ "columnNames": [
+ "userListId",
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_user_list_member_userListId_userId` ON `${TABLE_NAME}` (`userListId`, `userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "user_list",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "userListId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "instance_info_v1_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `host` TEXT NOT NULL, `name` TEXT, `description` TEXT, `clientMaxBodyByteSize` INTEGER, `iconUrl` TEXT, `themeColor` TEXT, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "host",
+ "columnName": "host",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "description",
+ "columnName": "description",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "clientMaxBodyByteSize",
+ "columnName": "clientMaxBodyByteSize",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "iconUrl",
+ "columnName": "iconUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "themeColor",
+ "columnName": "themeColor",
+ "affinity": "TEXT",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_instance_info_v1_table_host",
+ "unique": true,
+ "columnNames": [
+ "host"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_instance_info_v1_table_host` ON `${TABLE_NAME}` (`host`)"
+ }
+ ],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "user_badge_role",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `iconUrl` TEXT, `displayOrder` INTEGER NOT NULL, `userId` INTEGER NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`userId`) REFERENCES `user`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "iconUrl",
+ "columnName": "iconUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "displayOrder",
+ "columnName": "displayOrder",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_badge_role_userId",
+ "unique": false,
+ "columnNames": [
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_user_badge_role_userId` ON `${TABLE_NAME}` (`userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "user",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "userId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "search_histories",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `keyword` TEXT NOT NULL, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, FOREIGN KEY(`accountId`) REFERENCES `account_table`(`accountId`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "keyword",
+ "columnName": "keyword",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_search_histories_keyword_accountId",
+ "unique": true,
+ "columnNames": [
+ "keyword",
+ "accountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_search_histories_keyword_accountId` ON `${TABLE_NAME}` (`keyword`, `accountId`)"
+ },
+ {
+ "name": "index_search_histories_accountId",
+ "unique": false,
+ "columnNames": [
+ "accountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_search_histories_accountId` ON `${TABLE_NAME}` (`accountId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "account_table",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "accountId"
+ ],
+ "referencedColumns": [
+ "accountId"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user_info_state",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`description` TEXT, `followersCount` INTEGER, `followingCount` INTEGER, `hostLower` TEXT, `notesCount` INTEGER, `bannerUrl` TEXT, `url` TEXT, `isLocked` INTEGER NOT NULL, `birthday` TEXT, `createdAt` TEXT, `updatedAt` TEXT, `publicReactions` INTEGER, `userId` INTEGER NOT NULL, PRIMARY KEY(`userId`), FOREIGN KEY(`userId`) REFERENCES `user`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "description",
+ "columnName": "description",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "followersCount",
+ "columnName": "followersCount",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "followingCount",
+ "columnName": "followingCount",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "hostLower",
+ "columnName": "hostLower",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "notesCount",
+ "columnName": "notesCount",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "bannerUrl",
+ "columnName": "bannerUrl",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "url",
+ "columnName": "url",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "isLocked",
+ "columnName": "isLocked",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "birthday",
+ "columnName": "birthday",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "createdAt",
+ "columnName": "createdAt",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "updatedAt",
+ "columnName": "updatedAt",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "publicReactions",
+ "columnName": "publicReactions",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "userId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_info_state_userId",
+ "unique": true,
+ "columnNames": [
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_user_info_state_userId` ON `${TABLE_NAME}` (`userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "user",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "userId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "user_related_state",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`isFollowing` INTEGER NOT NULL, `isFollower` INTEGER NOT NULL, `isBlocking` INTEGER NOT NULL, `isMuting` INTEGER NOT NULL, `hasPendingFollowRequestFromYou` INTEGER NOT NULL, `hasPendingFollowRequestToYou` INTEGER NOT NULL, `isNotify` INTEGER, `userId` INTEGER NOT NULL, PRIMARY KEY(`userId`), FOREIGN KEY(`userId`) REFERENCES `user`(`id`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "isFollowing",
+ "columnName": "isFollowing",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isFollower",
+ "columnName": "isFollower",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isBlocking",
+ "columnName": "isBlocking",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isMuting",
+ "columnName": "isMuting",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "hasPendingFollowRequestFromYou",
+ "columnName": "hasPendingFollowRequestFromYou",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "hasPendingFollowRequestToYou",
+ "columnName": "hasPendingFollowRequestToYou",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isNotify",
+ "columnName": "isNotify",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "userId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_user_related_state_userId",
+ "unique": true,
+ "columnNames": [
+ "userId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_user_related_state_userId` ON `${TABLE_NAME}` (`userId`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "user",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "userId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "nodeinfo",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`host` TEXT NOT NULL, `nodeInfoVersion` TEXT NOT NULL, `name` TEXT NOT NULL, `version` TEXT NOT NULL, PRIMARY KEY(`host`))",
+ "fields": [
+ {
+ "fieldPath": "host",
+ "columnName": "host",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "nodeInfoVersion",
+ "columnName": "nodeInfoVersion",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "version",
+ "columnName": "version",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "host"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "mastodon_instance_info",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uri` TEXT NOT NULL, `title` TEXT NOT NULL, `description` TEXT NOT NULL, `email` TEXT NOT NULL, `version` TEXT NOT NULL, `urls_streamingApi` TEXT, `configuration_statuses_maxCharacters` INTEGER, `configuration_statuses_maxMediaAttachments` INTEGER, `configuration_polls_maxOptions` INTEGER, `configuration_polls_maxCharactersPerOption` INTEGER, `configuration_polls_minExpiration` INTEGER, `configuration_polls_maxExpiration` INTEGER, `configuration_emoji_reactions_myReactions` INTEGER, `configuration_emoji_reactions_maxReactionsPerAccount` INTEGER, PRIMARY KEY(`uri`))",
+ "fields": [
+ {
+ "fieldPath": "uri",
+ "columnName": "uri",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "description",
+ "columnName": "description",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "email",
+ "columnName": "email",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "version",
+ "columnName": "version",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "urls.streamingApi",
+ "columnName": "urls_streamingApi",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "configuration.statuses.maxCharacters",
+ "columnName": "configuration_statuses_maxCharacters",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "configuration.statuses.maxMediaAttachments",
+ "columnName": "configuration_statuses_maxMediaAttachments",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "configuration.polls.maxOptions",
+ "columnName": "configuration_polls_maxOptions",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "configuration.polls.maxCharactersPerOption",
+ "columnName": "configuration_polls_maxCharactersPerOption",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "configuration.polls.minExpiration",
+ "columnName": "configuration_polls_minExpiration",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "configuration.polls.maxExpiration",
+ "columnName": "configuration_polls_maxExpiration",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "configuration.emojiReactions.maxReactions",
+ "columnName": "configuration_emoji_reactions_myReactions",
+ "affinity": "INTEGER",
+ "notNull": false
+ },
+ {
+ "fieldPath": "configuration.emojiReactions.maxReactionsPerAccount",
+ "columnName": "configuration_emoji_reactions_maxReactionsPerAccount",
+ "affinity": "INTEGER",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "uri"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "notification_json_cache_v1",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `notificationId` TEXT NOT NULL, `json` TEXT NOT NULL, `key` TEXT, `weight` INTEGER NOT NULL, PRIMARY KEY(`accountId`, `notificationId`))",
+ "fields": [
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "notificationId",
+ "columnName": "notificationId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "json",
+ "columnName": "json",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "key",
+ "columnName": "key",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "weight",
+ "columnName": "weight",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "accountId",
+ "notificationId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_notification_json_cache_v1_key",
+ "unique": false,
+ "columnNames": [
+ "key"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_notification_json_cache_v1_key` ON `${TABLE_NAME}` (`key`)"
+ }
+ ],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "mastodon_word_filters_v1",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `filterId` TEXT NOT NULL, `phrase` TEXT NOT NULL, `wholeWord` INTEGER NOT NULL, `expiresAt` TEXT, `irreversible` INTEGER NOT NULL, `isContextHome` INTEGER NOT NULL, `isContextNotifications` INTEGER NOT NULL, `isContextPublic` INTEGER NOT NULL, `isContextThread` INTEGER NOT NULL, `isContextAccount` INTEGER NOT NULL, PRIMARY KEY(`accountId`, `filterId`))",
+ "fields": [
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "filterId",
+ "columnName": "filterId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "phrase",
+ "columnName": "phrase",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "wholeWord",
+ "columnName": "wholeWord",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "expiresAt",
+ "columnName": "expiresAt",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "irreversible",
+ "columnName": "irreversible",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isContextHome",
+ "columnName": "isContextHome",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isContextNotifications",
+ "columnName": "isContextNotifications",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isContextPublic",
+ "columnName": "isContextPublic",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isContextThread",
+ "columnName": "isContextThread",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isContextAccount",
+ "columnName": "isContextAccount",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "accountId",
+ "filterId"
+ ]
+ },
+ "indices": [],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "renote_mute_users",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`accountId` INTEGER NOT NULL, `userId` TEXT NOT NULL, `createdAt` TEXT NOT NULL, `postedAt` TEXT, PRIMARY KEY(`userId`, `accountId`))",
+ "fields": [
+ {
+ "fieldPath": "accountId",
+ "columnName": "accountId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userId",
+ "columnName": "userId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "createdAt",
+ "columnName": "createdAt",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "postedAt",
+ "columnName": "postedAt",
+ "affinity": "TEXT",
+ "notNull": false
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "userId",
+ "accountId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_renote_mute_users_postedAt",
+ "unique": false,
+ "columnNames": [
+ "postedAt"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_renote_mute_users_postedAt` ON `${TABLE_NAME}` (`postedAt`)"
+ },
+ {
+ "name": "index_renote_mute_users_accountId",
+ "unique": false,
+ "columnNames": [
+ "accountId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_renote_mute_users_accountId` ON `${TABLE_NAME}` (`accountId`)"
+ }
+ ],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "mastodon_instance_fedibird_capabilities",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`type` TEXT NOT NULL, `uri` TEXT NOT NULL, PRIMARY KEY(`uri`, `type`), FOREIGN KEY(`uri`) REFERENCES `mastodon_instance_info`(`uri`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "type",
+ "columnName": "type",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "uri",
+ "columnName": "uri",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "uri",
+ "type"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_mastodon_instance_fedibird_capabilities_uri",
+ "unique": false,
+ "columnNames": [
+ "uri"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_mastodon_instance_fedibird_capabilities_uri` ON `${TABLE_NAME}` (`uri`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "mastodon_instance_info",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "uri"
+ ],
+ "referencedColumns": [
+ "uri"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "pleroma_metadata_features",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`type` TEXT NOT NULL, `uri` TEXT NOT NULL, PRIMARY KEY(`uri`, `type`), FOREIGN KEY(`uri`) REFERENCES `mastodon_instance_info`(`uri`) ON UPDATE CASCADE ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "type",
+ "columnName": "type",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "uri",
+ "columnName": "uri",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "uri",
+ "type"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_pleroma_metadata_features_uri",
+ "unique": false,
+ "columnNames": [
+ "uri"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_pleroma_metadata_features_uri` ON `${TABLE_NAME}` (`uri`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "mastodon_instance_info",
+ "onDelete": "CASCADE",
+ "onUpdate": "CASCADE",
+ "columns": [
+ "uri"
+ ],
+ "referencedColumns": [
+ "uri"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "custom_emojis",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `emojiHost` TEXT NOT NULL, `url` TEXT, `uri` TEXT, `type` TEXT, `serverId` TEXT, `category` TEXT, `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)",
+ "fields": [
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "emojiHost",
+ "columnName": "emojiHost",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "url",
+ "columnName": "url",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "uri",
+ "columnName": "uri",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "type",
+ "columnName": "type",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "serverId",
+ "columnName": "serverId",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "category",
+ "columnName": "category",
+ "affinity": "TEXT",
+ "notNull": false
+ },
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_custom_emojis_emojiHost_name",
+ "unique": false,
+ "columnNames": [
+ "emojiHost",
+ "name"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_custom_emojis_emojiHost_name` ON `${TABLE_NAME}` (`emojiHost`, `name`)"
+ },
+ {
+ "name": "index_custom_emojis_emojiHost",
+ "unique": false,
+ "columnNames": [
+ "emojiHost"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_custom_emojis_emojiHost` ON `${TABLE_NAME}` (`emojiHost`)"
+ },
+ {
+ "name": "index_custom_emojis_name",
+ "unique": false,
+ "columnNames": [
+ "name"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_custom_emojis_name` ON `${TABLE_NAME}` (`name`)"
+ }
+ ],
+ "foreignKeys": []
+ },
+ {
+ "tableName": "custom_emoji_aliases",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `emojiId` INTEGER NOT NULL, PRIMARY KEY(`name`, `emojiId`), FOREIGN KEY(`emojiId`) REFERENCES `custom_emojis`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "emojiId",
+ "columnName": "emojiId",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "name",
+ "emojiId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_custom_emoji_aliases_emojiId",
+ "unique": false,
+ "columnNames": [
+ "emojiId"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_custom_emoji_aliases_emojiId` ON `${TABLE_NAME}` (`emojiId`)"
+ },
+ {
+ "name": "index_custom_emoji_aliases_name",
+ "unique": false,
+ "columnNames": [
+ "name"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_custom_emoji_aliases_name` ON `${TABLE_NAME}` (`name`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "custom_emojis",
+ "onDelete": "CASCADE",
+ "onUpdate": "NO ACTION",
+ "columns": [
+ "emojiId"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ }
+ ],
+ "views": [
+ {
+ "viewName": "user_view",
+ "createSql": "CREATE VIEW `${VIEW_NAME}` AS select user.*, nicknames.nickname from user left join nicknames on user.userName = nicknames.username and user.host = nicknames.host"
+ },
+ {
+ "viewName": "group_member_view",
+ "createSql": "CREATE VIEW `${VIEW_NAME}` AS select m.groupId, u.id as userId, u.avatarUrl, u.serverId from group_member_v1 as m \n inner join group_v1 as g\n inner join user as u\n on m.groupId = g.id\n and m.userId = u.serverId\n and g.accountId = u.accountId"
+ },
+ {
+ "viewName": "user_list_member_view",
+ "createSql": "CREATE VIEW `${VIEW_NAME}` AS select m.userListId, u.id as userId, u.avatarUrl, u.serverId from user_list_member as m \n inner join user_list as ul\n inner join user as u\n on m.userListId = ul.id\n and m.userId = u.serverId\n and ul.accountId = u.accountId"
+ }
+ ],
+ "setupQueries": [
+ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
+ "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '9257b02f1c5fb08f3a6b602d66676be8')"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/DataBase.kt b/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/DataBase.kt
index 2ad0919c46..d08897b25d 100644
--- a/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/DataBase.kt
+++ b/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/DataBase.kt
@@ -133,7 +133,7 @@ import net.pantasystem.milktea.data.infrastructure.user.renote.mute.db.RenoteMut
CustomEmojiRecord::class,
CustomEmojiAliasRecord::class,
],
- version = 58,
+ version = 59,
exportSchema = true,
autoMigrations = [
AutoMigration(from = 11, to = 12),
@@ -181,6 +181,7 @@ import net.pantasystem.milktea.data.infrastructure.user.renote.mute.db.RenoteMut
AutoMigration(from = 54, to = 55),
AutoMigration(from = 55, to = 56),
AutoMigration(from = 56, to = 57),
+ AutoMigration(from = 58, to = 59),
],
views = [UserView::class, GroupMemberView::class, UserListMemberView::class]
)
diff --git a/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/account/page/db/PageRecordParams.kt b/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/account/page/db/PageRecordParams.kt
index 4a313174f0..5039bf39fd 100644
--- a/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/account/page/db/PageRecordParams.kt
+++ b/modules/data/src/main/java/net/pantasystem/milktea/data/infrastructure/account/page/db/PageRecordParams.kt
@@ -79,6 +79,9 @@ data class PageRecordParams(
@ColumnInfo(name = "excludeReposts")
val excludeReposts: Boolean? = null,
+
+ @ColumnInfo(name = "excludeIfExistsSensitiveMedia")
+ val excludeIfExistsSensitiveMedia: Boolean? = null,
) {
fun toParams(): PageParams {
return PageParams(
@@ -107,6 +110,7 @@ data class PageRecordParams(
clipId = clipId,
excludeReplies = excludeReplies,
excludeReposts = excludeReposts,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
@@ -139,6 +143,7 @@ data class PageRecordParams(
clipId = clipId,
excludeReplies = excludeReplies,
excludeReposts = excludeReposts,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
}
diff --git a/modules/features/note/src/main/java/net/pantasystem/milktea/note/timeline/viewmodel/TimelineViewModel.kt b/modules/features/note/src/main/java/net/pantasystem/milktea/note/timeline/viewmodel/TimelineViewModel.kt
index 1fe1a464c5..f7a48422d2 100644
--- a/modules/features/note/src/main/java/net/pantasystem/milktea/note/timeline/viewmodel/TimelineViewModel.kt
+++ b/modules/features/note/src/main/java/net/pantasystem/milktea/note/timeline/viewmodel/TimelineViewModel.kt
@@ -21,6 +21,7 @@ import net.pantasystem.milktea.model.note.Note
import net.pantasystem.milktea.model.note.NoteStreaming
import net.pantasystem.milktea.model.note.TimelineScrollPositionRepository
import net.pantasystem.milktea.model.setting.LocalConfigRepository
+import net.pantasystem.milktea.note.timeline.viewmodel.filter.ExcludeIfExistsSensitiveMediaFilter
import net.pantasystem.milktea.note.timeline.viewmodel.filter.ExcludeRepostOrReplyFilter
import net.pantasystem.milktea.note.viewmodel.PlaneNoteViewData
import net.pantasystem.milktea.note.viewmodel.PlaneNoteViewDataCache
@@ -163,6 +164,7 @@ class TimelineViewModel @AssistedInject constructor(
}
})
cache.addFilter(ExcludeRepostOrReplyFilter(pageable))
+ cache.addFilter(ExcludeIfExistsSensitiveMediaFilter(pageable))
timelineStore.setActiveStreamingChangedListener { isActiveStreaming ->
if (isActiveStreaming && isActive) {
diff --git a/modules/features/note/src/main/java/net/pantasystem/milktea/note/timeline/viewmodel/filter/ExcludeIfExistsSensitiveMediaFilter.kt b/modules/features/note/src/main/java/net/pantasystem/milktea/note/timeline/viewmodel/filter/ExcludeIfExistsSensitiveMediaFilter.kt
new file mode 100644
index 0000000000..ef538e8d71
--- /dev/null
+++ b/modules/features/note/src/main/java/net/pantasystem/milktea/note/timeline/viewmodel/filter/ExcludeIfExistsSensitiveMediaFilter.kt
@@ -0,0 +1,36 @@
+package net.pantasystem.milktea.note.timeline.viewmodel.filter
+
+import net.pantasystem.milktea.model.account.page.CanExcludeIfExistsSensitiveMedia
+import net.pantasystem.milktea.model.account.page.Pageable
+import net.pantasystem.milktea.note.viewmodel.PlaneNoteViewData
+import net.pantasystem.milktea.note.viewmodel.PlaneNoteViewDataCache
+
+class ExcludeIfExistsSensitiveMediaFilter(private val pageable: Pageable) : PlaneNoteViewDataCache.ViewDataFilter {
+
+ override suspend fun check(viewData: PlaneNoteViewData): PlaneNoteViewData.FilterResult {
+ // 除外設定がされていない場合は何もしない
+ if ((pageable as? CanExcludeIfExistsSensitiveMedia<*>)?.getExcludeIfExistsSensitiveMedia() != true) {
+ return viewData.filterResult
+ }
+
+ // 自分の投稿ではないことを確認(リノートや返信も含む)
+ if (viewData.note.user.id.id == viewData.account.remoteId) {
+ // 何もしない
+ return viewData.filterResult
+ }
+
+ val hasSensitive = viewData.toShowNote.files?.any { file ->
+ file.isSensitive
+ } ?: false
+
+ val hasSensitiveInRenoteToNote = viewData.toShowNote.files?.any { file ->
+ file.isSensitive
+ } ?: false
+
+ if (hasSensitive || hasSensitiveInRenoteToNote) {
+ return PlaneNoteViewData.FilterResult.ShouldFilterNote
+ }
+
+ return viewData.filterResult
+ }
+}
\ No newline at end of file
diff --git a/modules/features/setting/src/main/java/net/pantasystem/milktea/setting/EditTabSettingDialog.kt b/modules/features/setting/src/main/java/net/pantasystem/milktea/setting/EditTabSettingDialog.kt
index b79eecfd03..7fc581d46a 100644
--- a/modules/features/setting/src/main/java/net/pantasystem/milktea/setting/EditTabSettingDialog.kt
+++ b/modules/features/setting/src/main/java/net/pantasystem/milktea/setting/EditTabSettingDialog.kt
@@ -8,6 +8,7 @@ import androidx.core.view.isVisible
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.activityViewModels
import dagger.hilt.android.AndroidEntryPoint
+import net.pantasystem.milktea.model.account.page.CanExcludeIfExistsSensitiveMedia
import net.pantasystem.milktea.model.account.page.CanExcludeReplies
import net.pantasystem.milktea.model.account.page.CanExcludeReposts
import net.pantasystem.milktea.model.account.page.CanOnlyMedia
@@ -80,6 +81,13 @@ class EditTabSettingDialog : AppCompatDialogFragment(){
binding.toggleExcludeReplies.isVisible = false
}
+ if (page.pageable() is CanExcludeIfExistsSensitiveMedia<*>) {
+ binding.toggleExcludeIfExistsSensitiveMedia.isVisible = true
+ binding.toggleExcludeIfExistsSensitiveMedia.isChecked = page.pageParams.excludeIfExistsSensitiveMedia ?: false
+ } else {
+ binding.toggleExcludeIfExistsSensitiveMedia.isVisible = false
+ }
+
binding.okButton.setOnClickListener {
val name = binding.editTabName.text?.toString()
if(name?.isNotBlank() == true){
@@ -111,6 +119,14 @@ class EditTabSettingDialog : AppCompatDialogFragment(){
}
else -> Unit
}
+ when(val pageable = target.pageable()) {
+ is CanExcludeIfExistsSensitiveMedia<*> -> {
+ target = target.copy(
+ pageParams = (pageable.setExcludeIfExistsSensitiveMedia(binding.toggleExcludeIfExistsSensitiveMedia.isChecked) as Pageable).toParams()
+ )
+ }
+ else -> Unit
+ }
val updated = target.copy(title = name)
pageSettingViewModel.updatePage(updated)
pageSettingViewModel.save()
diff --git a/modules/features/setting/src/main/res/layout/dialog_edit_tab_name.xml b/modules/features/setting/src/main/res/layout/dialog_edit_tab_name.xml
index 2a54cb5596..b0f962316d 100644
--- a/modules/features/setting/src/main/res/layout/dialog_edit_tab_name.xml
+++ b/modules/features/setting/src/main/res/layout/dialog_edit_tab_name.xml
@@ -44,12 +44,19 @@
android:layout_below="@id/toggleExcludeReplies"
android:text="@string/exclude_reposts"/>
+
+
{
@@ -57,6 +59,7 @@ data class PageParams(
excludeNsfw = excludeNsfw,
excludeReplies = excludeReplies,
excludeReposts = excludeReposts,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
SOCIAL -> {
@@ -64,7 +67,8 @@ data class PageParams(
withFiles = withFiles,
includeRenotedMyRenotes = includeRenotedMyRenotes,
includeMyRenotes = includeMyRenotes,
- includeLocalRenotes = includeLocalRenotes
+ includeLocalRenotes = includeLocalRenotes,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
GLOBAL -> {
@@ -72,6 +76,7 @@ data class PageParams(
withFiles = withFiles,
excludeReposts = excludeReposts,
excludeReplies = excludeReplies,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
SEARCH -> {
@@ -162,6 +167,7 @@ data class PageParams(
isOnlyMedia = withFiles,
excludeReposts = excludeReposts,
excludeReplies = excludeReplies,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
MASTODON_PUBLIC_TIMELINE -> {
@@ -169,12 +175,14 @@ data class PageParams(
isOnlyMedia = withFiles,
excludeReposts = excludeReposts,
excludeReplies = excludeReplies,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
MASTODON_HOME_TIMELINE -> {
Pageable.Mastodon.HomeTimeline(
excludeReposts = excludeReposts,
excludeReplies = excludeReplies,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
MASTODON_LIST_TIMELINE -> {
diff --git a/modules/model/src/main/java/net/pantasystem/milktea/model/account/page/Pageable.kt b/modules/model/src/main/java/net/pantasystem/milktea/model/account/page/Pageable.kt
index 02d59a4bf8..8736d34366 100644
--- a/modules/model/src/main/java/net/pantasystem/milktea/model/account/page/Pageable.kt
+++ b/modules/model/src/main/java/net/pantasystem/milktea/model/account/page/Pageable.kt
@@ -11,17 +11,20 @@ sealed class Pageable : Serializable {
var withFiles: Boolean? = null,
var excludeReposts: Boolean? = null,
- var excludeReplies: Boolean? = null
+ var excludeReplies: Boolean? = null,
+ val excludeIfExistsSensitiveMedia: Boolean? = null
) : Pageable(), UntilPaginate, SincePaginate,
CanOnlyMedia,
CanExcludeReplies,
- CanExcludeReposts {
+ CanExcludeReposts,
+ CanExcludeIfExistsSensitiveMedia {
override fun toParams(): PageParams {
return PageParams(
withFiles = withFiles,
type = PageType.GLOBAL,
excludeReplies = excludeReplies,
- excludeReposts = excludeReposts
+ excludeReposts = excludeReposts,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
@@ -58,6 +61,16 @@ sealed class Pageable : Serializable {
excludeReposts = isExcludeReposts
)
}
+
+ override fun getExcludeIfExistsSensitiveMedia(): Boolean {
+ return excludeIfExistsSensitiveMedia ?: false
+ }
+
+ override fun setExcludeIfExistsSensitiveMedia(isExcludeIfExistsSensitiveMedia: Boolean): GlobalTimeline {
+ return copy(
+ excludeIfExistsSensitiveMedia = isExcludeIfExistsSensitiveMedia
+ )
+ }
}
data class LocalTimeline(
@@ -65,10 +78,11 @@ sealed class Pageable : Serializable {
var withFiles: Boolean? = null,
var excludeNsfw: Boolean? = null,
var excludeReplies: Boolean? = null,
- var excludeReposts: Boolean? = null
+ var excludeReposts: Boolean? = null,
+ var excludeIfExistsSensitiveMedia: Boolean? = null
) : Pageable(), UntilPaginate, SincePaginate, CanOnlyMedia,
- CanExcludeReplies, CanExcludeReposts {
+ CanExcludeReplies, CanExcludeReposts, CanExcludeIfExistsSensitiveMedia {
override fun toParams(): PageParams {
return PageParams(
PageType.LOCAL,
@@ -110,6 +124,16 @@ sealed class Pageable : Serializable {
override fun getExcludeReposts(): Boolean {
return excludeReposts ?: false
}
+
+ override fun setExcludeIfExistsSensitiveMedia(isExcludeIfExistsSensitiveMedia: Boolean): LocalTimeline {
+ return copy(
+ excludeIfExistsSensitiveMedia = isExcludeIfExistsSensitiveMedia
+ )
+ }
+
+ override fun getExcludeIfExistsSensitiveMedia(): Boolean {
+ return excludeIfExistsSensitiveMedia ?: false
+ }
}
data class HybridTimeline(
@@ -119,10 +143,11 @@ sealed class Pageable : Serializable {
var includeMyRenotes: Boolean? = null,
var includeRenotedMyRenotes: Boolean? = null,
var excludeReplies: Boolean? = null,
- var excludeReposts: Boolean? = null
+ var excludeReposts: Boolean? = null,
+ var excludeIfExistsSensitiveMedia: Boolean? = null
) : Pageable(), UntilPaginate, SincePaginate, CanOnlyMedia,
- CanExcludeReplies, CanExcludeReposts {
+ CanExcludeReplies, CanExcludeReposts, CanExcludeIfExistsSensitiveMedia {
override fun toParams(): PageParams {
return PageParams(
type = PageType.SOCIAL,
@@ -131,7 +156,8 @@ sealed class Pageable : Serializable {
includeMyRenotes = includeMyRenotes,
includeRenotedMyRenotes = includeRenotedMyRenotes,
excludeReplies = excludeReplies,
- excludeReposts = excludeReposts
+ excludeReposts = excludeReposts,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
@@ -166,6 +192,16 @@ sealed class Pageable : Serializable {
override fun getExcludeReposts(): Boolean {
return excludeReposts ?: false
}
+
+ override fun getExcludeIfExistsSensitiveMedia(): Boolean {
+ return excludeIfExistsSensitiveMedia ?: false
+ }
+
+ override fun setExcludeIfExistsSensitiveMedia(isExcludeIfExistsSensitiveMedia: Boolean): HybridTimeline {
+ return copy(
+ excludeIfExistsSensitiveMedia = isExcludeIfExistsSensitiveMedia
+ )
+ }
}
data class HomeTimeline(
@@ -175,7 +211,8 @@ sealed class Pageable : Serializable {
var includeMyRenotes: Boolean? = null,
var includeRenotedMyRenotes: Boolean? = null,
var excludeReplies: Boolean? = null,
- var excludeReposts: Boolean? = null
+ var excludeReposts: Boolean? = null,
+ var excludeIfExistsSensitiveMedia: Boolean? = null
) : Pageable(), UntilPaginate, SincePaginate, CanOnlyMedia,
CanExcludeReplies, CanExcludeReposts {
@@ -189,6 +226,7 @@ sealed class Pageable : Serializable {
includeMyRenotes = includeMyRenotes,
excludeReplies = excludeReplies,
excludeReposts = excludeReposts,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
@@ -231,9 +269,9 @@ sealed class Pageable : Serializable {
var withFiles: Boolean? = null,
var includeLocalRenotes: Boolean? = null,
var includeMyRenotes: Boolean? = null,
- var includeRenotedMyRenotes: Boolean? = null
-
- ) : Pageable(), UntilPaginate, SincePaginate, CanOnlyMedia {
+ var includeRenotedMyRenotes: Boolean? = null,
+ var excludeIfExistsSensitiveMedia: Boolean? = null,
+ ) : Pageable(), UntilPaginate, SincePaginate, CanOnlyMedia, CanExcludeIfExistsSensitiveMedia {
override fun toParams(): PageParams {
return PageParams(
@@ -242,7 +280,8 @@ sealed class Pageable : Serializable {
withFiles = withFiles,
includeLocalRenotes = includeLocalRenotes,
includeMyRenotes = includeMyRenotes,
- includeRenotedMyRenotes = includeRenotedMyRenotes
+ includeRenotedMyRenotes = includeRenotedMyRenotes,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
@@ -257,6 +296,16 @@ sealed class Pageable : Serializable {
override fun getOnlyMedia(): Boolean {
return withFiles ?: false
}
+
+ override fun getExcludeIfExistsSensitiveMedia(): Boolean {
+ return excludeIfExistsSensitiveMedia ?: false
+ }
+
+ override fun setExcludeIfExistsSensitiveMedia(isExcludeIfExistsSensitiveMedia: Boolean): UserListTimeline {
+ return copy(
+ excludeIfExistsSensitiveMedia = isExcludeIfExistsSensitiveMedia
+ )
+ }
}
data class ChannelTimeline(
@@ -479,13 +528,15 @@ sealed class Pageable : Serializable {
val isOnlyMedia: Boolean? = null,
val excludeReplies: Boolean? = null,
val excludeReposts: Boolean? = null,
- ) : Mastodon(), CanOnlyMedia, UntilPaginate, SincePaginate, CanExcludeReplies, CanExcludeReposts {
+ val excludeIfExistsSensitiveMedia: Boolean? = null,
+ ) : Mastodon(), CanOnlyMedia, UntilPaginate, SincePaginate, CanExcludeReplies, CanExcludeReposts, CanExcludeIfExistsSensitiveMedia {
override fun toParams(): PageParams {
return PageParams(
type = PageType.MASTODON_PUBLIC_TIMELINE,
withFiles = isOnlyMedia,
excludeReplies = excludeReplies,
- excludeReposts = excludeReposts
+ excludeReposts = excludeReposts,
+ excludeIfExistsSensitiveMedia = excludeIfExistsSensitiveMedia,
)
}
@@ -518,13 +569,24 @@ sealed class Pageable : Serializable {
override fun getExcludeReposts(): Boolean {
return excludeReposts ?: false
}
+
+ override fun getExcludeIfExistsSensitiveMedia(): Boolean {
+ return excludeIfExistsSensitiveMedia ?: false
+ }
+
+ override fun setExcludeIfExistsSensitiveMedia(isExcludeIfExistsSensitiveMedia: Boolean): PublicTimeline {
+ return copy(
+ excludeIfExistsSensitiveMedia = isExcludeIfExistsSensitiveMedia
+ )
+ }
}
data class LocalTimeline(
val isOnlyMedia: Boolean? = null,
val excludeReplies: Boolean? = null,
val excludeReposts: Boolean? = null,
- ) : Mastodon(), CanOnlyMedia, UntilPaginate, SincePaginate, CanExcludeReplies, CanExcludeReposts {
+ val excludeIfExistsSensitiveMedia: Boolean? = null,
+ ) : Mastodon(), CanOnlyMedia, UntilPaginate, SincePaginate, CanExcludeReplies, CanExcludeReposts, CanExcludeIfExistsSensitiveMedia {
override fun toParams(): PageParams {
return PageParams(
type = PageType.MASTODON_LOCAL_TIMELINE,
@@ -563,6 +625,16 @@ sealed class Pageable : Serializable {
override fun getExcludeReposts(): Boolean {
return excludeReposts ?: false
}
+
+ override fun getExcludeIfExistsSensitiveMedia(): Boolean {
+ return excludeIfExistsSensitiveMedia ?: false
+ }
+
+ override fun setExcludeIfExistsSensitiveMedia(isExcludeIfExistsSensitiveMedia: Boolean): LocalTimeline {
+ return copy(
+ excludeIfExistsSensitiveMedia = isExcludeIfExistsSensitiveMedia
+ )
+ }
}
data class HashTagTimeline(val hashtag: String, val isOnlyMedia: Boolean? = null) :
@@ -598,7 +670,8 @@ sealed class Pageable : Serializable {
data class HomeTimeline(
val excludeReplies: Boolean? = null,
val excludeReposts: Boolean? = null,
- ) : Mastodon(), SincePaginate, UntilPaginate, CanExcludeReposts, CanExcludeReplies {
+ val excludeIfExistsSensitiveMedia: Boolean? = null,
+ ) : Mastodon(), SincePaginate, UntilPaginate, CanExcludeReposts, CanExcludeReplies, CanExcludeIfExistsSensitiveMedia {
override fun toParams(): PageParams {
return PageParams(
type = PageType.MASTODON_HOME_TIMELINE,
@@ -626,6 +699,16 @@ sealed class Pageable : Serializable {
excludeReposts = isExcludeReposts
)
}
+
+ override fun getExcludeIfExistsSensitiveMedia(): Boolean {
+ return excludeIfExistsSensitiveMedia ?: false
+ }
+
+ override fun setExcludeIfExistsSensitiveMedia(isExcludeIfExistsSensitiveMedia: Boolean): HomeTimeline {
+ return copy(
+ excludeIfExistsSensitiveMedia = isExcludeIfExistsSensitiveMedia
+ )
+ }
}
data class UserTimeline(
@@ -718,4 +801,9 @@ interface CanExcludeReplies {
interface CanExcludeReposts {
fun setExcludeReposts(isExcludeReposts: Boolean): T
fun getExcludeReposts(): Boolean
+}
+
+interface CanExcludeIfExistsSensitiveMedia {
+ fun setExcludeIfExistsSensitiveMedia(isExcludeIfExistsSensitiveMedia: Boolean): T
+ fun getExcludeIfExistsSensitiveMedia(): Boolean
}
\ No newline at end of file