1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
use Illuminate\Database\Migrations\Migration; |
4
|
|
|
use Illuminate\Database\Schema\Blueprint; |
5
|
|
|
use Illuminate\Support\Facades\Schema; |
6
|
|
|
|
7
|
|
|
class CreateH5pLibrariesTable extends Migration |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* Run the migrations. |
11
|
|
|
* |
12
|
|
|
* @return void |
13
|
|
|
*/ |
14
|
|
|
public function up() |
15
|
|
|
{ |
16
|
|
|
Schema::create('h5p_libraries', function (Blueprint $table) { |
17
|
|
|
$table->bigIncrements('id'); |
18
|
|
|
$table->timestamps(); |
19
|
|
|
$table->string('name', 127); |
20
|
|
|
$table->string('title'); |
21
|
|
|
$table->bigInteger('major_version')->unsigned(); |
22
|
|
|
$table->bigInteger('minor_version')->unsigned(); |
23
|
|
|
$table->bigInteger('patch_version')->unsigned(); |
24
|
|
|
$table->bigInteger('runnable')->unsigned()->index('runnable'); |
25
|
|
|
$table->integer('restricted')->unsigned()->default(0); |
26
|
|
|
$table->bigInteger('fullscreen')->unsigned(); |
27
|
|
|
$table->string('embed_types'); |
28
|
|
|
$table->text('preloaded_js', 65535)->nullable(); |
|
|
|
|
29
|
|
|
$table->text('preloaded_css', 65535)->nullable(); |
30
|
|
|
$table->text('drop_library_css', 65535)->nullable(); |
31
|
|
|
$table->text('semantics', 65535); |
32
|
|
|
$table->string('tutorial_url', 1023); |
33
|
|
|
$table->integer('has_icon')->unsigned()->default(0); |
34
|
|
|
$table->index(['name', 'major_version', 'minor_version', 'patch_version'], 'name_version'); |
35
|
|
|
}); |
36
|
|
|
} |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Reverse the migrations. |
40
|
|
|
* |
41
|
|
|
* @return void |
42
|
|
|
*/ |
43
|
|
|
public function down() |
44
|
|
|
{ |
45
|
|
|
Schema::drop('h5p_libraries'); |
46
|
|
|
} |
47
|
|
|
} |
48
|
|
|
|
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.