@@ 41-51 (lines=11) @@ | ||
38 | * @param FieldType $type |
|
39 | * @param AssignmentInterface $assignment |
|
40 | */ |
|
41 | public function addColumn($table, FieldType $type, AssignmentInterface $assignment) |
|
42 | { |
|
43 | $schema = $type->getSchema(); |
|
44 | ||
45 | $this->schema->table( |
|
46 | $table, |
|
47 | function (Blueprint $table) use ($schema, $assignment) { |
|
48 | $schema->addColumn($table, $assignment); |
|
49 | } |
|
50 | ); |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * Update a column. |
|
@@ 60-70 (lines=11) @@ | ||
57 | * @param FieldType $type |
|
58 | * @param AssignmentInterface $assignment |
|
59 | */ |
|
60 | public function updateColumn($table, FieldType $type, AssignmentInterface $assignment) |
|
61 | { |
|
62 | $schema = $type->getSchema(); |
|
63 | ||
64 | $this->schema->table( |
|
65 | $table, |
|
66 | function (Blueprint $table) use ($schema, $assignment) { |
|
67 | $schema->updateColumn($table, $assignment); |
|
68 | } |
|
69 | ); |
|
70 | } |
|
71 | ||
72 | /** |
|
73 | * Rename a column. |