新增 family_invite 家庭邀请码表(schema+0009迁移)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-08-19 15:17:38 +08:00
co-authored by Claude Haiku 4.5
parent 8c9d8ece1a
commit da7f7a6a19
3 changed files with 33 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
-- xuchao: 家庭邀请码——家长生成一次性邀请码,其他家长凭码注册加入家庭。幂等。
CREATE TABLE IF NOT EXISTS `family_invite` (
`id` bigint AUTO_INCREMENT NOT NULL,
`family_id` bigint NOT NULL,
`code_hash` varchar(64) NOT NULL,
`created_by` bigint NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`expires_at` datetime NOT NULL,
`used_at` datetime,
CONSTRAINT `family_invite_id` PRIMARY KEY(`id`)
);
+7
View File
@@ -64,6 +64,13 @@
"when": 1786233600000,
"tag": "0008_points",
"breakpoints": true
},
{
"idx": 9,
"version": "5",
"when": 1786320000000,
"tag": "0009_family-invite",
"breakpoints": true
}
]
}