icloud auth done

This commit is contained in:
2026-01-19 00:54:59 +07:00
parent c6df7f956d
commit 6c16245040
9 changed files with 254 additions and 311 deletions

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
return function (PDO $db): void {
$db->exec("PRAGMA foreign_keys = ON;");
$db->exec("
CREATE TABLE IF NOT EXISTS icloud_accounts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
remote_name TEXT NOT NULL UNIQUE,
apple_id TEXT NOT NULL,
password TEXT NOT NULL,
trust_token TEXT NOT NULL,
cookies TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'connected',
connected_at INTEGER NOT NULL,
created_at INTEGER NOT NULL,
FOREIGN KEY(user_id) REFERENCES users(id)
);
");
};