1 | <?php |
||
6 | class CreateConfigTable extends Migration { |
||
7 | |||
8 | /** |
||
9 | * Run the migrations. |
||
10 | * |
||
11 | * @return void |
||
12 | */ |
||
13 | public function up() |
||
14 | { |
||
15 | Schema::create('config', function(Blueprint $table) |
||
16 | { |
||
17 | $table->increments('id'); |
||
18 | $table->char('name'); |
||
19 | $table->text('value'); |
||
20 | $table->char('type'); |
||
21 | $table->timestamps(); |
||
22 | |||
23 | $table->index(['name', 'type']); |
||
24 | }); |
||
25 | } |
||
26 | |||
27 | |||
28 | /** |
||
29 | * Reverse the migrations. |
||
30 | * |
||
31 | * @return void |
||
32 | */ |
||
33 | public function down() |
||
34 | { |
||
35 | Schema::dropIfExists('config'); |
||
36 | } |
||
37 | |||
38 | } |
||
39 |