|
@@ 19-28 (lines=10) @@
|
| 16 |
|
$this->info = $info; |
| 17 |
|
} |
| 18 |
|
|
| 19 |
|
public function foreignKey($tableName, $columnNames, array $options = []) |
| 20 |
|
{ |
| 21 |
|
$schema = isset($options['schema']) ? new Schema($options['schema']) : null; |
| 22 |
|
$table = new RentgenTable($tableName, $schema); |
| 23 |
|
|
| 24 |
|
$this->setTable($table); |
| 25 |
|
$this->setColumns($columnNames); |
| 26 |
|
|
| 27 |
|
return $this; |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
public function reference($tableName, $columnNames, array $options = []) |
| 31 |
|
{ |
|
@@ 30-39 (lines=10) @@
|
| 27 |
|
return $this; |
| 28 |
|
} |
| 29 |
|
|
| 30 |
|
public function reference($tableName, $columnNames, array $options = []) |
| 31 |
|
{ |
| 32 |
|
$schema = isset($options['schema']) ? new Schema($options['schema']) : null; |
| 33 |
|
$table = new RentgenTable($tableName, $schema); |
| 34 |
|
|
| 35 |
|
$this->setReferencedTable($table); |
| 36 |
|
$this->setReferencedColumns($columnNames); |
| 37 |
|
|
| 38 |
|
return $this; |
| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
|