1: | <?php |
2: | |
3: | use Illuminate\Database\Migrations\Migration; |
4: | use Illuminate\Database\Schema\Blueprint; |
5: | use Illuminate\Database\Capsule\Manager as Capsule; |
6: | |
7: | class CreateOauthAccountsTable extends Migration |
8: | { |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | public function up() |
15: | { |
16: | Capsule::schema()->create('oauth_accounts', function (Blueprint $table) { |
17: | $table->id('Id'); |
18: | $table->integer('IdUser')->default(0); |
19: | $table->string('IdSocial')->default(''); |
20: | $table->string('Type')->default(''); |
21: | $table->string('Name')->default(''); |
22: | $table->string('Email')->default(''); |
23: | $table->text('AccessToken'); |
24: | $table->string('RefreshToken')->default(''); |
25: | $table->string('Scopes')->default(''); |
26: | $table->boolean('Disabled')->default(false); |
27: | $table->string('AccountType')->default('oauth'); |
28: | $table->timestamp(\Aurora\System\Classes\Model::CREATED_AT)->nullable(); |
29: | $table->timestamp(\Aurora\System\Classes\Model::UPDATED_AT)->nullable(); |
30: | }); |
31: | } |
32: | |
33: | |
34: | |
35: | |
36: | |
37: | |
38: | public function down() |
39: | { |
40: | Capsule::schema()->dropIfExists('oauth_accounts'); |
41: | } |
42: | } |
43: | |