forked from pterodactyl/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2015_11_15_220208_create_users_table.php
More file actions
106 lines (96 loc) · 3.72 KB
/
2015_11_15_220208_create_users_table.php
File metadata and controls
106 lines (96 loc) · 3.72 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->char('uuid', 36)->unique();
$table->string('username')->nullable();
$table->string('email')->unique();
$table->text('password');
$table->char('language', 2);
$table->char('session_id', 12);
$table->string('session_ip');
$table->tinyInteger('root_admin')->unsigned();
$table->tinyInteger('use_totp')->unsigned();
$table->char('totp_secret', 16);
$table->timestamps();
});
Schema::create('locations', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->string('short')->unique();
$table->string('long');
});
Schema::create('nodes', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->smallInteger('public')->unsigned();
$table->string('name');
$table->mediumInteger('location')->unsigned();
$table->string('fqdn')->unique();
$table->string('ip');
$table->integer('memory')->unsigned();
$table->integer('disk')->unsigned();
$table->char('daemonSecret', 36)->unique();
$table->smallInteger('daemonListen')->unsigned()->default(5656);
$table->smallInteger('daemonSFTP')->unsigned()->default(22);
$table->string('daemonBase')->default('/home/');
});
Schema::create('servers', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->char('uuid', 36)->unique();
$table->mediumInteger('node')->unsigned();
$table->string('name');
$table->tinyInteger('active')->unsigned();
$table->mediumInteger('owner')->unsigned();
$table->integer('memory')->unsigned();
$table->integer('disk')->unsigned();
$table->integer('io')->unsigned();
$table->integer('cpu')->unsigned();
$table->string('ip');
$table->integer('port')->unsigned();
$table->text('daemonStartup')->nullable();
$table->text('daemonSecret');
$table->string('username');
$table->integer('installed')->unsigned()->default(0);
$table->timestamps();
});
Schema::create('daemon', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->mediumInteger('server')->unsigned();
$table->string('parameter');
$table->text('value');
$table->tinyInteger('editable')->unsigned()->default(0);
$table->tinyInteger('visible')->unsigned()->default(0);
$table->text('regex')->nullable();
$table->timestamps();
});
Schema::create('allocations', function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->mediumInteger('node')->unsigned();
$table->string('ip');
$table->mediumInteger('port');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('allocations');
Schema::dropIfExists('daemon');
Schema::dropIfExists('servers');
Schema::dropIfExists('nodes');
Schema::dropIfExists('locations');
Schema::dropIfExists('users');
}
}