|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
use Phinx\Migration\AbstractMigration; |
|
4
|
|
|
|
|
5
|
|
|
class CreateDrafts extends AbstractMigration |
|
|
|
|
|
|
6
|
|
|
{ |
|
7
|
|
|
public function change() |
|
8
|
|
|
{ |
|
9
|
|
|
$draft = $this->table('draft', ['id' => 'draft_id']); |
|
10
|
|
|
|
|
11
|
|
|
$draft->addColumn('commish_id', 'integer', ['limit' => 11]) |
|
12
|
|
|
->addColumn('draft_create_time', 'datetime') |
|
13
|
|
|
->addColumn('draft_name', 'text') |
|
14
|
|
|
->addColumn('draft_sport', 'text') |
|
15
|
|
|
->addColumn('draft_status', 'text') |
|
16
|
|
|
->addColumn('draft_counter', 'integer', ['limit' => 11, 'default' => 0]) |
|
17
|
|
|
->addColumn('draft_style', 'text') |
|
18
|
|
|
->addColumn('draft_rounds', 'integer', ['limit' => 2, 'signed' => false, 'default' => 0]) |
|
19
|
|
|
->addColumn('draft_password', 'text', ['null' => true, 'default' => null]) |
|
20
|
|
|
->addColumn('draft_start_time', 'datetime', ['null' => true, 'default' => null]) |
|
21
|
|
|
->addColumn('draft_end_time', 'datetime', ['null' => true, 'default' => null]) |
|
22
|
|
|
->addColumn('draft_stats_generated', 'datetime', ['null' => true, 'default' => null]) |
|
23
|
|
|
->addColumn('draft_current_round', 'integer', ['limit' => 5, 'default' => 1, 'signed' => false]) |
|
24
|
|
|
->addColumn('draft_current_pick', 'integer', ['limit' => 5, 'default' => 1, 'signed' => false]) |
|
25
|
|
|
->addColumn('nfl_extended', 'boolean', ['limit' => 1, 'default' => 0]) |
|
26
|
|
|
->addColumn('using_depth_charts', 'boolean', ['default' => 0]) |
|
27
|
|
|
->addIndex(['commish_id']) |
|
28
|
|
|
->create(); |
|
29
|
|
|
} |
|
30
|
|
|
} |
|
31
|
|
|
|
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.