(name, columns)
| 617 | return idCol!; |
| 618 | }, |
| 619 | unique(name, columns) { |
| 620 | uniqueConstraints.push({ |
| 621 | name, |
| 622 | columns: columns.map((name) => { |
| 623 | const column = this.columns[name]; |
| 624 | if (!column) |
| 625 | throw new Error(`Unknown column name ${name.toString()}`); |
| 626 | |
| 627 | return column; |
| 628 | }), |
| 629 | }); |
| 630 | |
| 631 | return this; |
| 632 | }, |
| 633 | policy(policy) { |
| 634 | policies.push(policy as StoredTablePolicy); |
| 635 | return this; |