feat(bot): ✨ Add "Delete My Activity Data" button to p.me.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from tortoise import BaseDBAsyncClient
|
||||
|
||||
|
||||
async def upgrade(db: BaseDBAsyncClient) -> str:
|
||||
return """
|
||||
DROP INDEX "idx_report_status_d6b157";
|
||||
DROP INDEX "idx_ban_user_id_37a9cf";
|
||||
ALTER TABLE "user" ADD "is_deleting" BOOL NOT NULL DEFAULT False;
|
||||
CREATE INDEX "idx_ban_user_id_37a9cf" ON "ban" ("user_id", "expires_at");;
|
||||
CREATE INDEX "idx_report_status_d6b157" ON "report" ("status", "priority");;
|
||||
CREATE INDEX "idx_user_is_dele_2b4cfd" ON "user" ("is_deleting");"""
|
||||
|
||||
|
||||
async def downgrade(db: BaseDBAsyncClient) -> str:
|
||||
return """
|
||||
DROP INDEX "idx_report_status_d6b157";
|
||||
DROP INDEX "idx_user_is_dele_2b4cfd";
|
||||
DROP INDEX "idx_ban_user_id_37a9cf";
|
||||
ALTER TABLE "user" DROP COLUMN "is_deleting";
|
||||
CREATE INDEX "idx_ban_user_id_37a9cf" ON "ban" ("user_id", "expires_at");;
|
||||
CREATE INDEX "idx_report_status_d6b157" ON "report" ("status", "priority");;"""
|
||||
Reference in New Issue
Block a user