Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2697 lines
69 KiB
JSON
2697 lines
69 KiB
JSON
{
|
|
"version": "5",
|
|
"dialect": "mysql",
|
|
"id": "d2b2e99f-82b9-4546-87c6-e8eb3f0bfe50",
|
|
"prevId": "3b2f3875-7548-47c5-a33b-9a7e97998972",
|
|
"tables": {
|
|
"bot_reminders": {
|
|
"name": "bot_reminders",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"upload_id": {
|
|
"name": "upload_id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"trigger_comment_id": {
|
|
"name": "trigger_comment_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"note": {
|
|
"name": "note",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"remind_at": {
|
|
"name": "remind_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fired_at": {
|
|
"name": "fired_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"bot_reminders_due_idx": {
|
|
"name": "bot_reminders_due_idx",
|
|
"columns": [
|
|
"fired_at",
|
|
"remind_at"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"bot_reminders_user_id_users_id_fk": {
|
|
"name": "bot_reminders_user_id_users_id_fk",
|
|
"tableFrom": "bot_reminders",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"bot_reminders_upload_id_uploads_id_fk": {
|
|
"name": "bot_reminders_upload_id_uploads_id_fk",
|
|
"tableFrom": "bot_reminders",
|
|
"tableTo": "uploads",
|
|
"columnsFrom": [
|
|
"upload_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"bot_reminders_trigger_comment_id_comments_id_fk": {
|
|
"name": "bot_reminders_trigger_comment_id_comments_id_fk",
|
|
"tableFrom": "bot_reminders",
|
|
"tableTo": "comments",
|
|
"columnsFrom": [
|
|
"trigger_comment_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"bot_reminders_id": {
|
|
"name": "bot_reminders_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"comment_attachments": {
|
|
"name": "comment_attachments",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"comment_id": {
|
|
"name": "comment_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"file_name": {
|
|
"name": "file_name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"original_name": {
|
|
"name": "original_name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"mime_type": {
|
|
"name": "mime_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"size": {
|
|
"name": "size",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"cover": {
|
|
"name": "cover",
|
|
"type": "varchar(2048)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"meta": {
|
|
"name": "meta",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"comment_attachments_comment_id_comments_id_fk": {
|
|
"name": "comment_attachments_comment_id_comments_id_fk",
|
|
"tableFrom": "comment_attachments",
|
|
"tableTo": "comments",
|
|
"columnsFrom": [
|
|
"comment_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"comment_attachments_id": {
|
|
"name": "comment_attachments_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"comment_reactions": {
|
|
"name": "comment_reactions",
|
|
"columns": {
|
|
"comment_id": {
|
|
"name": "comment_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"emoji": {
|
|
"name": "emoji",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"comment_reactions_comment_id_comments_id_fk": {
|
|
"name": "comment_reactions_comment_id_comments_id_fk",
|
|
"tableFrom": "comment_reactions",
|
|
"tableTo": "comments",
|
|
"columnsFrom": [
|
|
"comment_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"comment_reactions_user_id_users_id_fk": {
|
|
"name": "comment_reactions_user_id_users_id_fk",
|
|
"tableFrom": "comment_reactions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"comment_reactions_comment_id_user_id_emoji_pk": {
|
|
"name": "comment_reactions_comment_id_user_id_emoji_pk",
|
|
"columns": [
|
|
"comment_id",
|
|
"user_id",
|
|
"emoji"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"comments": {
|
|
"name": "comments",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"upload_id": {
|
|
"name": "upload_id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"is_bot": {
|
|
"name": "is_bot",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"content": {
|
|
"name": "content",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"comments_upload_id_uploads_id_fk": {
|
|
"name": "comments_upload_id_uploads_id_fk",
|
|
"tableFrom": "comments",
|
|
"tableTo": "uploads",
|
|
"columnsFrom": [
|
|
"upload_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"comments_user_id_users_id_fk": {
|
|
"name": "comments_user_id_users_id_fk",
|
|
"tableFrom": "comments",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"comments_id": {
|
|
"name": "comments_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"direct_message_reactions": {
|
|
"name": "direct_message_reactions",
|
|
"columns": {
|
|
"message_id": {
|
|
"name": "message_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"emoji": {
|
|
"name": "emoji",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"seen_at": {
|
|
"name": "seen_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"dmr_user_seen_idx": {
|
|
"name": "dmr_user_seen_idx",
|
|
"columns": [
|
|
"user_id",
|
|
"seen_at"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"direct_message_reactions_message_id_direct_messages_id_fk": {
|
|
"name": "direct_message_reactions_message_id_direct_messages_id_fk",
|
|
"tableFrom": "direct_message_reactions",
|
|
"tableTo": "direct_messages",
|
|
"columnsFrom": [
|
|
"message_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"direct_message_reactions_user_id_users_id_fk": {
|
|
"name": "direct_message_reactions_user_id_users_id_fk",
|
|
"tableFrom": "direct_message_reactions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"direct_message_reactions_message_id_user_id_emoji_pk": {
|
|
"name": "direct_message_reactions_message_id_user_id_emoji_pk",
|
|
"columns": [
|
|
"message_id",
|
|
"user_id",
|
|
"emoji"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"direct_messages": {
|
|
"name": "direct_messages",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"sender_id": {
|
|
"name": "sender_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"recipient_id": {
|
|
"name": "recipient_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"content": {
|
|
"name": "content",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"attachments": {
|
|
"name": "attachments",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"read_at": {
|
|
"name": "read_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"dm_sent_idx": {
|
|
"name": "dm_sent_idx",
|
|
"columns": [
|
|
"sender_id",
|
|
"recipient_id"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"dm_received_idx": {
|
|
"name": "dm_received_idx",
|
|
"columns": [
|
|
"recipient_id",
|
|
"sender_id"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"dm_group_idx": {
|
|
"name": "dm_group_idx",
|
|
"columns": [
|
|
"group_id"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"direct_messages_sender_id_users_id_fk": {
|
|
"name": "direct_messages_sender_id_users_id_fk",
|
|
"tableFrom": "direct_messages",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"sender_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"direct_messages_recipient_id_users_id_fk": {
|
|
"name": "direct_messages_recipient_id_users_id_fk",
|
|
"tableFrom": "direct_messages",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"recipient_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"direct_messages_group_id_dm_groups_id_fk": {
|
|
"name": "direct_messages_group_id_dm_groups_id_fk",
|
|
"tableFrom": "direct_messages",
|
|
"tableTo": "dm_groups",
|
|
"columnsFrom": [
|
|
"group_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"direct_messages_id": {
|
|
"name": "direct_messages_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"dm_group_members": {
|
|
"name": "dm_group_members",
|
|
"columns": {
|
|
"group_id": {
|
|
"name": "group_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"last_read_id": {
|
|
"name": "last_read_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"dm_group_members_group_id_dm_groups_id_fk": {
|
|
"name": "dm_group_members_group_id_dm_groups_id_fk",
|
|
"tableFrom": "dm_group_members",
|
|
"tableTo": "dm_groups",
|
|
"columnsFrom": [
|
|
"group_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"dm_group_members_user_id_users_id_fk": {
|
|
"name": "dm_group_members_user_id_users_id_fk",
|
|
"tableFrom": "dm_group_members",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"dm_group_members_group_id_user_id_pk": {
|
|
"name": "dm_group_members_group_id_user_id_pk",
|
|
"columns": [
|
|
"group_id",
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"dm_groups": {
|
|
"name": "dm_groups",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_by": {
|
|
"name": "created_by",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"avatar": {
|
|
"name": "avatar",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"color": {
|
|
"name": "color",
|
|
"type": "varchar(7)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"dm_groups_created_by_users_id_fk": {
|
|
"name": "dm_groups_created_by_users_id_fk",
|
|
"tableFrom": "dm_groups",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"created_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"dm_groups_id": {
|
|
"name": "dm_groups_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"favorites": {
|
|
"name": "favorites",
|
|
"columns": {
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"upload_id": {
|
|
"name": "upload_id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"favorites_user_id_users_id_fk": {
|
|
"name": "favorites_user_id_users_id_fk",
|
|
"tableFrom": "favorites",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"favorites_upload_id_uploads_id_fk": {
|
|
"name": "favorites_upload_id_uploads_id_fk",
|
|
"tableFrom": "favorites",
|
|
"tableTo": "uploads",
|
|
"columnsFrom": [
|
|
"upload_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"favorites_user_id_upload_id_pk": {
|
|
"name": "favorites_user_id_upload_id_pk",
|
|
"columns": [
|
|
"user_id",
|
|
"upload_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"hall_items": {
|
|
"name": "hall_items",
|
|
"columns": {
|
|
"hall_id": {
|
|
"name": "hall_id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"upload_id": {
|
|
"name": "upload_id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"added_by": {
|
|
"name": "added_by",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"position": {
|
|
"name": "position",
|
|
"type": "int unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"hall_items_order_idx": {
|
|
"name": "hall_items_order_idx",
|
|
"columns": [
|
|
"hall_id",
|
|
"position"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"hall_items_hall_id_halls_id_fk": {
|
|
"name": "hall_items_hall_id_halls_id_fk",
|
|
"tableFrom": "hall_items",
|
|
"tableTo": "halls",
|
|
"columnsFrom": [
|
|
"hall_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"hall_items_upload_id_uploads_id_fk": {
|
|
"name": "hall_items_upload_id_uploads_id_fk",
|
|
"tableFrom": "hall_items",
|
|
"tableTo": "uploads",
|
|
"columnsFrom": [
|
|
"upload_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"hall_items_added_by_users_id_fk": {
|
|
"name": "hall_items_added_by_users_id_fk",
|
|
"tableFrom": "hall_items",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"added_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"hall_items_hall_id_upload_id_pk": {
|
|
"name": "hall_items_hall_id_upload_id_pk",
|
|
"columns": [
|
|
"hall_id",
|
|
"upload_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"halls": {
|
|
"name": "halls",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"visibility": {
|
|
"name": "visibility",
|
|
"type": "enum('public','unlisted','private')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'public'"
|
|
},
|
|
"is_standard": {
|
|
"name": "is_standard",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"halls_user_idx": {
|
|
"name": "halls_user_idx",
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"halls_standard_idx": {
|
|
"name": "halls_standard_idx",
|
|
"columns": [
|
|
"is_standard"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"halls_user_id_users_id_fk": {
|
|
"name": "halls_user_id_users_id_fk",
|
|
"tableFrom": "halls",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"halls_id": {
|
|
"name": "halls_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"link_previews": {
|
|
"name": "link_previews",
|
|
"columns": {
|
|
"url_hash": {
|
|
"name": "url_hash",
|
|
"type": "char(64)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"url": {
|
|
"name": "url",
|
|
"type": "varchar(2048)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"image": {
|
|
"name": "image",
|
|
"type": "varchar(2048)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"fetched_at": {
|
|
"name": "fetched_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"link_previews_url_hash": {
|
|
"name": "link_previews_url_hash",
|
|
"columns": [
|
|
"url_hash"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"meme_templates": {
|
|
"name": "meme_templates",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"file_name": {
|
|
"name": "file_name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"mime_type": {
|
|
"name": "mime_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"is_public": {
|
|
"name": "is_public",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"is_standard": {
|
|
"name": "is_standard",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"meme_templates_user_id_users_id_fk": {
|
|
"name": "meme_templates_user_id_users_id_fk",
|
|
"tableFrom": "meme_templates",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"meme_templates_id": {
|
|
"name": "meme_templates_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"notifications": {
|
|
"name": "notifications",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"actor_id": {
|
|
"name": "actor_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"upload_id": {
|
|
"name": "upload_id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"comment_id": {
|
|
"name": "comment_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"is_read": {
|
|
"name": "is_read",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"notifications_user_id_users_id_fk": {
|
|
"name": "notifications_user_id_users_id_fk",
|
|
"tableFrom": "notifications",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"notifications_actor_id_users_id_fk": {
|
|
"name": "notifications_actor_id_users_id_fk",
|
|
"tableFrom": "notifications",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"actor_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"notifications_upload_id_uploads_id_fk": {
|
|
"name": "notifications_upload_id_uploads_id_fk",
|
|
"tableFrom": "notifications",
|
|
"tableTo": "uploads",
|
|
"columnsFrom": [
|
|
"upload_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"notifications_comment_id_comments_id_fk": {
|
|
"name": "notifications_comment_id_comments_id_fk",
|
|
"tableFrom": "notifications",
|
|
"tableTo": "comments",
|
|
"columnsFrom": [
|
|
"comment_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"notifications_id": {
|
|
"name": "notifications_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"permissions": {
|
|
"name": "permissions",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"label": {
|
|
"name": "label",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"permissions_id": {
|
|
"name": "permissions_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"permissions_key_unique": {
|
|
"name": "permissions_key_unique",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"point_purchases": {
|
|
"name": "point_purchases",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"item": {
|
|
"name": "item",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"cost": {
|
|
"name": "cost",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"point_purchases_user_id_users_id_fk": {
|
|
"name": "point_purchases_user_id_users_id_fk",
|
|
"tableFrom": "point_purchases",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"point_purchases_id": {
|
|
"name": "point_purchases_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"role_permissions": {
|
|
"name": "role_permissions",
|
|
"columns": {
|
|
"role_id": {
|
|
"name": "role_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"permission_id": {
|
|
"name": "permission_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"role_permissions_role_id_roles_id_fk": {
|
|
"name": "role_permissions_role_id_roles_id_fk",
|
|
"tableFrom": "role_permissions",
|
|
"tableTo": "roles",
|
|
"columnsFrom": [
|
|
"role_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"role_permissions_permission_id_permissions_id_fk": {
|
|
"name": "role_permissions_permission_id_permissions_id_fk",
|
|
"tableFrom": "role_permissions",
|
|
"tableTo": "permissions",
|
|
"columnsFrom": [
|
|
"permission_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"role_permissions_role_id_permission_id_pk": {
|
|
"name": "role_permissions_role_id_permission_id_pk",
|
|
"columns": [
|
|
"role_id",
|
|
"permission_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"roles": {
|
|
"name": "roles",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"roles_id": {
|
|
"name": "roles_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"roles_name_unique": {
|
|
"name": "roles_name_unique",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"sessions": {
|
|
"name": "sessions",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"sessions_user_id_users_id_fk": {
|
|
"name": "sessions_user_id_users_id_fk",
|
|
"tableFrom": "sessions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"sessions_id": {
|
|
"name": "sessions_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"settings": {
|
|
"name": "settings",
|
|
"columns": {
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"settings_key": {
|
|
"name": "settings_key",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"site_stats": {
|
|
"name": "site_stats",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"computed_at": {
|
|
"name": "computed_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"users_total": {
|
|
"name": "users_total",
|
|
"type": "int unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"uploads_total": {
|
|
"name": "uploads_total",
|
|
"type": "int unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"comments_total": {
|
|
"name": "comments_total",
|
|
"type": "int unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"reactions_total": {
|
|
"name": "reactions_total",
|
|
"type": "int unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"favorites_total": {
|
|
"name": "favorites_total",
|
|
"type": "int unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"payload": {
|
|
"name": "payload",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"site_stats_id": {
|
|
"name": "site_stats_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"stickers": {
|
|
"name": "stickers",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"file_name": {
|
|
"name": "file_name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"mime_type": {
|
|
"name": "mime_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"is_standard": {
|
|
"name": "is_standard",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"stickers_user_id_users_id_fk": {
|
|
"name": "stickers_user_id_users_id_fk",
|
|
"tableFrom": "stickers",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"stickers_id": {
|
|
"name": "stickers_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"stickers_name_unique": {
|
|
"name": "stickers_name_unique",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"tags": {
|
|
"name": "tags",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"tags_id": {
|
|
"name": "tags_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"tags_name_unique": {
|
|
"name": "tags_name_unique",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"thread_subscriptions": {
|
|
"name": "thread_subscriptions",
|
|
"columns": {
|
|
"upload_id": {
|
|
"name": "upload_id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"thread_subscriptions_upload_id_uploads_id_fk": {
|
|
"name": "thread_subscriptions_upload_id_uploads_id_fk",
|
|
"tableFrom": "thread_subscriptions",
|
|
"tableTo": "uploads",
|
|
"columnsFrom": [
|
|
"upload_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"thread_subscriptions_user_id_users_id_fk": {
|
|
"name": "thread_subscriptions_user_id_users_id_fk",
|
|
"tableFrom": "thread_subscriptions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"thread_subscriptions_upload_id_user_id_pk": {
|
|
"name": "thread_subscriptions_upload_id_user_id_pk",
|
|
"columns": [
|
|
"upload_id",
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"upload_reactions": {
|
|
"name": "upload_reactions",
|
|
"columns": {
|
|
"upload_id": {
|
|
"name": "upload_id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"emoji": {
|
|
"name": "emoji",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"upload_reactions_upload_id_uploads_id_fk": {
|
|
"name": "upload_reactions_upload_id_uploads_id_fk",
|
|
"tableFrom": "upload_reactions",
|
|
"tableTo": "uploads",
|
|
"columnsFrom": [
|
|
"upload_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"upload_reactions_user_id_users_id_fk": {
|
|
"name": "upload_reactions_user_id_users_id_fk",
|
|
"tableFrom": "upload_reactions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"upload_reactions_upload_id_user_id_emoji_pk": {
|
|
"name": "upload_reactions_upload_id_user_id_emoji_pk",
|
|
"columns": [
|
|
"upload_id",
|
|
"user_id",
|
|
"emoji"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"upload_tags": {
|
|
"name": "upload_tags",
|
|
"columns": {
|
|
"upload_id": {
|
|
"name": "upload_id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"tag_id": {
|
|
"name": "tag_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"upload_tags_upload_id_uploads_id_fk": {
|
|
"name": "upload_tags_upload_id_uploads_id_fk",
|
|
"tableFrom": "upload_tags",
|
|
"tableTo": "uploads",
|
|
"columnsFrom": [
|
|
"upload_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"upload_tags_tag_id_tags_id_fk": {
|
|
"name": "upload_tags_tag_id_tags_id_fk",
|
|
"tableFrom": "upload_tags",
|
|
"tableTo": "tags",
|
|
"columnsFrom": [
|
|
"tag_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"upload_tags_upload_id_tag_id_pk": {
|
|
"name": "upload_tags_upload_id_tag_id_pk",
|
|
"columns": [
|
|
"upload_id",
|
|
"tag_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"uploads": {
|
|
"name": "uploads",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(8)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"is_bot": {
|
|
"name": "is_bot",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "enum('image','video','audio','youtube','twitch','link')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"file_name": {
|
|
"name": "file_name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"external_url": {
|
|
"name": "external_url",
|
|
"type": "varchar(2048)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"original_name": {
|
|
"name": "original_name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"mime_type": {
|
|
"name": "mime_type",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"size": {
|
|
"name": "size",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"preview_image": {
|
|
"name": "preview_image",
|
|
"type": "varchar(2048)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"preview_title": {
|
|
"name": "preview_title",
|
|
"type": "varchar(500)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"audio_meta": {
|
|
"name": "audio_meta",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"comment_count": {
|
|
"name": "comment_count",
|
|
"type": "int unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"lock_comments": {
|
|
"name": "lock_comments",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"lock_reactions": {
|
|
"name": "lock_reactions",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"lock_stickers": {
|
|
"name": "lock_stickers",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"lock_links": {
|
|
"name": "lock_links",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"lock_youtube": {
|
|
"name": "lock_youtube",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"boosted_until": {
|
|
"name": "boosted_until",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"golden_until": {
|
|
"name": "golden_until",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"spotlight_until": {
|
|
"name": "spotlight_until",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"uploads_user_id_users_id_fk": {
|
|
"name": "uploads_user_id_users_id_fk",
|
|
"tableFrom": "uploads",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"uploads_id": {
|
|
"name": "uploads_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"user_follows": {
|
|
"name": "user_follows",
|
|
"columns": {
|
|
"follower_id": {
|
|
"name": "follower_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"followed_id": {
|
|
"name": "followed_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"user_follows_followed_idx": {
|
|
"name": "user_follows_followed_idx",
|
|
"columns": [
|
|
"followed_id"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_follows_follower_id_users_id_fk": {
|
|
"name": "user_follows_follower_id_users_id_fk",
|
|
"tableFrom": "user_follows",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"follower_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_follows_followed_id_users_id_fk": {
|
|
"name": "user_follows_followed_id_users_id_fk",
|
|
"tableFrom": "user_follows",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"followed_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"user_follows_follower_id_followed_id_pk": {
|
|
"name": "user_follows_follower_id_followed_id_pk",
|
|
"columns": [
|
|
"follower_id",
|
|
"followed_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"user_roles": {
|
|
"name": "user_roles",
|
|
"columns": {
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"role_id": {
|
|
"name": "role_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"user_roles_user_id_users_id_fk": {
|
|
"name": "user_roles_user_id_users_id_fk",
|
|
"tableFrom": "user_roles",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_roles_role_id_roles_id_fk": {
|
|
"name": "user_roles_role_id_roles_id_fk",
|
|
"tableFrom": "user_roles",
|
|
"tableTo": "roles",
|
|
"columnsFrom": [
|
|
"role_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"user_roles_user_id_role_id_pk": {
|
|
"name": "user_roles_user_id_role_id_pk",
|
|
"columns": [
|
|
"user_id",
|
|
"role_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"users": {
|
|
"name": "users",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"display_name": {
|
|
"name": "display_name",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"display_name_expires_at": {
|
|
"name": "display_name_expires_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"password_hash": {
|
|
"name": "password_hash",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"color": {
|
|
"name": "color",
|
|
"type": "varchar(7)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"bio": {
|
|
"name": "bio",
|
|
"type": "varchar(160)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"avatar": {
|
|
"name": "avatar",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"card_effect": {
|
|
"name": "card_effect",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"card_effect_color": {
|
|
"name": "card_effect_color",
|
|
"type": "varchar(7)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"card_vignette": {
|
|
"name": "card_vignette",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"card_border_effect": {
|
|
"name": "card_border_effect",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"card_border_effect_color": {
|
|
"name": "card_border_effect_color",
|
|
"type": "varchar(7)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"card_holo_effect": {
|
|
"name": "card_holo_effect",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"card_banner": {
|
|
"name": "card_banner",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"card_banner_type": {
|
|
"name": "card_banner_type",
|
|
"type": "enum('image','video')",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"flair": {
|
|
"name": "flair",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"flair_expires_at": {
|
|
"name": "flair_expires_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"name_gradient_until": {
|
|
"name": "name_gradient_until",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sticker_bonus_slots": {
|
|
"name": "sticker_bonus_slots",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"users_id": {
|
|
"name": "users_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"users_name_unique": {
|
|
"name": "users_name_unique",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
},
|
|
"users_email_unique": {
|
|
"name": "users_email_unique",
|
|
"columns": [
|
|
"email"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"youtube_channel_subs": {
|
|
"name": "youtube_channel_subs",
|
|
"columns": {
|
|
"channel_id": {
|
|
"name": "channel_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"youtube_channel_subs_channel_id_youtube_channels_id_fk": {
|
|
"name": "youtube_channel_subs_channel_id_youtube_channels_id_fk",
|
|
"tableFrom": "youtube_channel_subs",
|
|
"tableTo": "youtube_channels",
|
|
"columnsFrom": [
|
|
"channel_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"youtube_channel_subs_user_id_users_id_fk": {
|
|
"name": "youtube_channel_subs_user_id_users_id_fk",
|
|
"tableFrom": "youtube_channel_subs",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"youtube_channel_subs_channel_id_user_id_pk": {
|
|
"name": "youtube_channel_subs_channel_id_user_id_pk",
|
|
"columns": [
|
|
"channel_id",
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"youtube_channels": {
|
|
"name": "youtube_channels",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "bigint unsigned",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"channel_id": {
|
|
"name": "channel_id",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"url": {
|
|
"name": "url",
|
|
"type": "varchar(2048)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"last_video_id": {
|
|
"name": "last_video_id",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"last_published_at": {
|
|
"name": "last_published_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"youtube_channels_id": {
|
|
"name": "youtube_channels_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"youtube_channels_channel_id_unique": {
|
|
"name": "youtube_channels_channel_id_unique",
|
|
"columns": [
|
|
"channel_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
}
|
|
},
|
|
"views": {},
|
|
"_meta": {
|
|
"schemas": {},
|
|
"tables": {},
|
|
"columns": {}
|
|
},
|
|
"internal": {
|
|
"tables": {},
|
|
"indexes": {}
|
|
}
|
|
} |