Completed
Push — master ( c5c126...29bff4 )
by Edson
01:37
created

TweetSchema::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Bonfim\ActiveRecord\Examples\Database\Migrations;
4
5
use Bonfim\ActiveRecord\Schema;
6
7
class TweetSchema extends Schema
8
{
9
    function up()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
10
    {
11
        $this->create('tweets', function ($table) {
12
            $table->increments();
13
14
            $table
15
                ->integer('user_id')
16
//                ->unsigned()
17
                ->notNull()
18
                ->references('users', 'id')
19
                ->onUpdate('CASCADE')
20
                ->onDelete('CASCADE');
21
22
            $table->string('content', 240)->notNull();
23
            $table->timestamps();
24
        });
25
    }
26
27
    function down()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
28
    {
29
        echo 'down';
30
    }
31
}
32