增加一次性群邀请链接和二维码
This commit is contained in:
1 parent
dfeb5bfefa
commit
5ec9c81f90
18 files changed
+727
-14
No files matched your search
@@ -0,0 +1,5 @@
|
||||
CREATE TABLE group_invite_links (
|
||||
group_id uuid PRIMARY KEY REFERENCES chat_groups(id) ON DELETE CASCADE,
|
||||
token_hash bytea NOT NULL UNIQUE CHECK (octet_length(token_hash) = 32),
|
||||
expires_at timestamptz NOT NULL
|
||||
);
|
||||
@@ -40,6 +40,9 @@ var groupPreferencesMigration string
|
||||
//go:embed 011_group_seen.sql
|
||||
var groupSeenMigration string
|
||||
|
||||
//go:embed 012_group_invite_link.sql
|
||||
var groupInviteLinkMigration string
|
||||
|
||||
func Migrate(ctx context.Context, pool *pgxpool.Pool) error {
|
||||
tx, err := pool.Begin(ctx)
|
||||
if err != nil {
|
||||
@@ -55,7 +58,7 @@ func Migrate(ctx context.Context, pool *pgxpool.Pool) error {
|
||||
for index, migration := range []string{
|
||||
identityMigration, contactsMigration, deliveryMigration, keyPackagesMigration, mlsCredentialsMigration,
|
||||
attachmentsMigration, groupsMigration, groupTransportMigration, groupAttachmentsMigration, groupPreferencesMigration,
|
||||
groupSeenMigration,
|
||||
groupSeenMigration, groupInviteLinkMigration,
|
||||
} {
|
||||
version := index + 1
|
||||
var applied bool
|
||||
|
||||
Reference in new issue
Block a user