feat: establish NekoNest Cloud control and relay
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
CREATE TABLE `account_deletion_requests` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`account_id` text NOT NULL,
|
||||
`status` text DEFAULT 'requested' NOT NULL,
|
||||
`reason` text,
|
||||
`requested_at` text NOT NULL,
|
||||
`cancelled_at` text,
|
||||
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `idx_account_deletion_one_requested` ON `account_deletion_requests` (`account_id`) WHERE "account_deletion_requests"."status" = 'requested';--> statement-breakpoint
|
||||
CREATE INDEX `idx_account_deletion_status_time` ON `account_deletion_requests` (`status`,`requested_at`);
|
||||
Reference in New Issue
Block a user