-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateAllTables.php
51 lines (44 loc) · 2.02 KB
/
CreateAllTables.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
use Luke\Migration\MethodType;
use Luke\Migration\Schema;
class CreateAllTables
{
public function up()
{
// Schema::create("users", function (MethodType $table) {
// return array(
// $table->id()->unique()->autIncrement()->createRow(),
// $table->string("auth_id")->createRow(),
// $table->string('photo')->createRow(),
// $table->string('name')->notNull()->createRow(),
// $table->string('email')->unique()->notNull()->createRow(),
// $table->string('password')->createRow(),
// $table->integer('level')->default(1)->createRow(),
// $table->string('email_verified')->createRow(),
// $table->datetime('email_verification_at')->createRow(),
// $table->createAt()->createRow(),
// $table->updateAt()->createRow(),
// );
// });
// Schema::create("categories", function (MethodType $table) {
// return array(
// $table->id()->unique()->autIncrement()->createRow(),
// $table->string('name')->notNull()->unique()->createRow()
// );
// });
// Schema::create("products", function (MethodType $table) {
// return array(
// $table->id()->unique()->autIncrement()->createRow(),
// $table->integer('category_id')->unsigned()->notNull()->createRow(),
// $table->string('image')->createRow(),
// $table->string('name')->notNull()->unique()->createRow(),
// $table->float('value')->notNull()->createRow(),
// $table->integer('qts')->notNull()->createRow(),
// $table->string('size')->notNull()->createRow(),
// $table->createAt()->createRow(),
// $table->updateAt()->createRow(),
// $table->foreignKey('category_id')->references('categories')->createRow()
// );
// });
}
}