@@ 138-147 (lines=10) @@ | ||
135 | * |
|
136 | * @return TableApi Self. |
|
137 | */ |
|
138 | public function addUnique($columns) |
|
139 | { |
|
140 | $unique = new Unique($columns, $this); |
|
141 | ||
142 | $this->actions[] = function () use ($unique) { |
|
143 | return $this->manipulation->create($unique); |
|
144 | }; |
|
145 | ||
146 | return $this; |
|
147 | } |
|
148 | ||
149 | /** |
|
150 | * Drop a unique constraint. |
|
@@ 156-165 (lines=10) @@ | ||
153 | * |
|
154 | * @return TableApi Self. |
|
155 | */ |
|
156 | public function dropUnique($columns) |
|
157 | { |
|
158 | $unique = new Unique($columns, $this); |
|
159 | ||
160 | $this->actions[] = function () use ($unique) { |
|
161 | return $this->manipulation->drop($unique); |
|
162 | }; |
|
163 | ||
164 | return $this; |
|
165 | } |
|
166 | ||
167 | /** |
|
168 | * Add a index on columns. |