新增 family_invite 家庭邀请码表(schema+0009迁移)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
8c9d8ece1a
commit
da7f7a6a19
@@ -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`)
|
||||
);
|
||||
Reference in New Issue
Block a user