@@ 174-183 (lines=10) @@ | ||
171 | * |
|
172 | * @return TableApi Self. |
|
173 | */ |
|
174 | public function addIndex($columns) |
|
175 | { |
|
176 | $index = new Index($columns, $this); |
|
177 | ||
178 | $this->actions[] = function () use ($index) { |
|
179 | return $this->manipulation->create($index); |
|
180 | }; |
|
181 | ||
182 | return $this; |
|
183 | } |
|
184 | ||
185 | /** |
|
186 | * Drop a index on columns. |
|
@@ 192-201 (lines=10) @@ | ||
189 | * |
|
190 | * @return TableApi Self. |
|
191 | */ |
|
192 | public function dropIndex($columns) |
|
193 | { |
|
194 | $index = new Index($columns, $this); |
|
195 | ||
196 | $this->actions[] = function () use ($index) { |
|
197 | return $this->manipulation->drop($index); |
|
198 | }; |
|
199 | ||
200 | return $this; |
|
201 | } |
|
202 | } |
|
203 |