public function installModule()
{
parent::installModule();
$this->container->get('db')->schema()->create('groups', function ($table) {
$table->increments('id');
$table->string('name');
$table->text('description')->nullable();
$table->char('active', 1)->default(1);
$table->timestamps();
});
$this->container->get('db')->schema()->create('users', function ($table) {
$table->increments('id');
$table->string('email', 120)->unique();
$table->string('login', 70)->unique();
$table->string('password', 80);
$table->char('active', 1)->default(1);
$table->integer('group_id')->default(3)->unsigned();
$table->timestamps();
$table->index(['email', 'login']);
$table->foreign('group_id')->references('id')->on('groups');
});
$this->seed();
}