Issues (4)

test/users.php (1 issue)

Labels
Severity
1
<?php
2
use Erikai\Migration;
0 ignored issues
show
The type Erikai\Migration was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
3
require "vendor/autoload.php";
4
$create = new Migration();
5
$create->table('users');
6
$create->column('id')->type('int(11)')->default();
7
$create->column('name')->type('varchar(255)')->default();
8
$create->column('password')->type('text')->default()->null();
9
$create->column('email')->type('varchar(255)')->default();
10
$create->column('level')->type('int(11)')->default();
11
$create->column('profile')->type('varchar(255)')->default()->null();
12
$create->column('cover')->type('varchar(255)')->default()->null();
13
$create->column('created_at')->type('timestamp')->default("current_timestamp()");
14
$create->column('updated_at')->type('timestamp')->default("current_timestamp() ON UPDATE current_timestamp()");
15
$create->save();
16
$create->primary('id');
17
$create->autoIncrement('id');