forked from rainlab/user-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_users_table.php
36 lines (31 loc) · 1.12 KB
/
create_users_table.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php namespace RainLab\User\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class CreateUsersTable extends Migration
{
public function up()
{
Schema::create('users', function($table)
{
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('name')->nullable();
$table->string('email')->unique();
$table->string('password');
$table->string('activation_code')->nullable()->index();
$table->string('persist_code')->nullable();
$table->string('reset_password_code')->nullable()->index();
$table->text('permissions')->nullable();
$table->boolean('is_activated')->default(0);
$table->timestamp('activated_at')->nullable();
$table->timestamp('last_login')->nullable();
$table->integer('country_id')->unsigned()->nullable()->index();
$table->integer('state_id')->unsigned()->nullable()->index();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('users');
}
}