-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmigration.php
More file actions
86 lines (79 loc) · 2.91 KB
/
migration.php
File metadata and controls
86 lines (79 loc) · 2.91 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
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* The connection name for the migration.
*/
protected $connection = 'iseries';
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('MYUSERS', function (Blueprint $table)
{
$table->bigInteger('id')->primary();
$table->string('name');
$table->boolean('status')->default(true);
$table->setSystemName('MYUSERS01F');
});
Schema::create('MYTABLE', function (Blueprint $table)
{
$table->binary('binary');
$table->bigInteger('bigInteger')->primary();
$table->char('char')->index();
$table->date('date')->nullable();
$table->dateTime('dateTime');
$table->dateTimeTz('dateTimeTz');
$table->decimal('decimal');
$table->double('double');
$table->float('float')->index();
$table->integer('integer');
$table->ipAddress('ipAddress')->nullable();
$table->json('json');
$table->jsonb('jsonb')->nullable();
$table->longText('longText');
$table->macAddress('macAddress')->unique();
$table->mediumInteger('mediumInteger');
$table->mediumText('mediumText');
$table->morphs('morphs');
$table->nullableUlidMorphs('nullableUlidMorphs');
$table->nullableUuidMorphs('nullableUuidMorphs');
$table->nullableMorphs('nullableMorphs');
$table->rememberToken('rememberToken');
$table->smallInteger('smallInteger');
$table->softDeletes();
$table->string('string')->index();
$table->text('text');
$table->time('time');
$table->timestamp('timestamp')->nullable();
$table->timestamps();
$table->timestampTz('timestampTz');
$table->timeTz('timeTz');
$table->tinyInteger('tinyInteger');
$table->tinyText('tinyText');
$table->ulid('ulid')->unique();
$table->ulidMorphs('ulidMorphs');
$table->unsignedBigInteger('unsignedBigInteger');
$table->unsignedInteger('unsignedInteger');
$table->unsignedMediumInteger('unsignedMediumInteger');
$table->unsignedSmallInteger('unsignedSmallInteger');
$table->unsignedTinyInteger('unsignedTinyInteger');
$table->uuid('uuid');
$table->uuidMorphs('uuidMorphs');
$table->year('year');
$table->setSystemName('MYTABLE01F');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('MYUSERS');
Schema::dropIfExists('MYTABLE');
}
};