A lot of things.
This commit is contained in:
17
Setup.php
17
Setup.php
@@ -25,19 +25,22 @@ class Setup extends AbstractSetup
|
||||
}
|
||||
|
||||
/**
|
||||
* Create club request table.
|
||||
* Create club table.
|
||||
* @return void
|
||||
*/
|
||||
public function installStep2(): void
|
||||
{
|
||||
$this->schemaManager()->createTable('xf_club_request', function(Create $table){
|
||||
$table->addColumn('request_id', 'int')->autoIncrement();
|
||||
$this->schemaManager()->createTable('xf_club', function(Create $table){
|
||||
$table->addColumn('club_id', 'int')->autoIncrement();
|
||||
$table->addColumn( 'node_id', 'int' );
|
||||
$table->addColumn('user_id', 'int');
|
||||
$table->addColumn('title', 'varchar', 100);
|
||||
$table->addColumn('description', 'text');
|
||||
$table->addColumn('request_state', 'enum')->values(['visible','moderated','rejected'])->setDefault('moderated');
|
||||
$table->addColumn('request_date','int');
|
||||
$table->addKey('request_state');
|
||||
$table->addColumn('club_state', 'enum')->values(['visible','moderated','rejected'])->setDefault('moderated');
|
||||
$table->addColumn('club_creation_date','int');
|
||||
$table->addColumn('banner_date', 'int')->setDefault(0);
|
||||
$table->addPrimaryKey('club_id');
|
||||
$table->addKey('club_state');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -50,6 +53,6 @@ class Setup extends AbstractSetup
|
||||
|
||||
public function uninstallStep2(): void
|
||||
{
|
||||
$this->schemaManager()->dropTable('xf_club_request');
|
||||
$this->schemaManager()->dropTable('xf_club');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user