Skip to content

Commit 7c5eb19

Browse files
committed
Issues-449: added new GroupInvitation table
1 parent 1b7ff32 commit 7c5eb19

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

config/vanilla/bootstrap.early.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,19 @@
137137
Gdn::sql()->query($emptyAncestorQuery);
138138
}
139139

140+
// FIX: https://github.com/topcoder-platform/forums/issues/449
141+
if(!Gdn::structure()->tableExists('GroupInvitation')) {
142+
// Group Invitation Table
143+
Gdn::structure()->table('GroupInvitation')
144+
->primaryKey('GroupInvitationID')
145+
->column('GroupID', 'int', false, 'index')
146+
->column('Token', 'varchar(32)', false, 'unique')
147+
->column('InvitedByUserID', 'int', false, 'index')
148+
->column('InviteeUserID', 'int', false, 'index')
149+
->column('DateInserted', 'datetime', false, 'index')
150+
->column('Status', ['pending', 'accepted', 'declined', 'deleted'])
151+
->column('DateAccepted', 'datetime', true)
152+
->column('DateExpires', 'datetime')
153+
->set(false, false);
154+
}
140155
}

config/vanilla/config.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php if (!defined('APPLICATION')) exit();
22

3+
$Configuration['Garden']['Title']='';
34
$Configuration['Garden']['Installed'] = true;
45

56
$Configuration['Database']['Name'] = getenv('MYSQL_DATABASE');
@@ -113,6 +114,8 @@
113114
$Configuration['Plugins']['Sumologic']['HttpSourceURL'] = '';
114115
$Configuration['Plugins']['Sumologic']['BatchSize'] = 10;
115116

117+
// e.g. '+15 min', '+1 day'
118+
$Configuration['Plugins']['Groups']['InviteExpiration']= '+20 min';
116119

117120
// RichEditor
118121
$Configuration['RichEditor']['Quote']['Enable'] = true;

0 commit comments

Comments
 (0)